Magento 2 SSO module helps the Magento 2 store to integrate with other third-party applications. The user can sign-in to the third-party applications by their Magento 2 sign-up credentials. The admin can easily integrate multiple clients for Single Sign-On by their Magento credentials. The admin can also integrate his/her UVdesk support portal with his/her Magento store.
Features Of Magento 2 SSO
- The admin can make his/her users log-in to other third-party applications by their Magento credentials.
- No need to remember multiple login access to your other portals like support portal by the users.
- The non-signed-in user will be signed in automatically on a third-party application.
- The admin can easily integrate multiple clients for client single sign-on login.
- All the SSO integrations can be managed by the admin. The admin can add/view/edit/delete any integration.
- The admin can integrate his/her UVdesk support portal with his/her Magento store.
Installation Of Magento 2 SSO
Customers will get a zip folder and they have to extract the contents of this zip folder on their system. The extracted folder has an src folder, inside the src folder you have the app folder. You need to transfer this app folder into the Magento2 root directory on the server as shown below.
After the successful installation, you have to run the command on Magento2 root directory-“php bin/magento setup:upgrade”
After the successful installation, you have to run these below mentioned commands in the Magento2 root directory:
Second Command – php bin/magento setup:di:compile
Third Command – php bin/magento setup:static-content:deploy
Fourth Command – composer require firebase/php-jwt
After moving the app folder you have to flush the cache from Magento admin panel by navigating through->System->Cache management as shown below.
admin Magento 2 SSO Integration Management
The admin can easily manage multiple integrations. The admin can add/edit/delete integration. The SSO integration management can be navigated by clicking on SSO tab at the admin’s backend panel. Admin Login -> SSO.
- Adding new integration by “Add New Integration“.
- The admin can view all the created integrations with their details such as Name of client, Email Id of client and the URL.
- The admin can edit any integration via “Edit” button in the Action column.
The admin can add new integration by navigating through SSO -> Add New Integration -> Client Details.
- Name: Here the admin will give the name of the client who can log in from his/her Magento 2 credentials.
- Url: URL link of the website which will be integrated for SSO.
- Email: Here the admin will provide the email Id of the client.
Now, after all the client details have been filled by the admin, the admin can save the new integration via “Save” button. It generates the client credentials required for the integration.
The Client Credentials can be viewed by navigating through SSO -> Add New Integration -> Edit(of the required integration) -> Client Credentials
The admin can Edit the added integration by navigating SSO -> Edit (of the required integration) -> Client Detail. After editing the admin will lastly save the edited integration.
The admin can Delete the added integration by navigating SSO -> Edit (of the required integration) -> Delete.
UVdesk Support Portal Integration
Please Note: To integrate Magento store with UVdesk you must have UVdesk admin account. You can Sign up for free at UVdesk to have your own UVdesk admin account.
- The admin can integrate his/her UVdesk support portal with their Magento Store.
- The admin’s users can log-in to the UVdesk support portal via Magento login credentials.
- The users who are not signed-in will be automatically signed-in to the UVdesk support portal of the client.
- After log-in from the Magento credential, the user can create a ticket for any support query from the UVdesk portal.
Please Note: Download the free Magento 2 SSO(of UVdesk) from your UVdesk admin panel. Click here to learn about Magento 2 SSO(of UVdesk) installation and configuration.
Now the admin will add integration for UVdesk. SSO -> Add New Integration -> Client Details.
- Name of the user for which the SSO integration is created.
- URL of the UVdesk support portal of the admin.
- Email id of the user for which the SSO integration is created.
- Lastly, the admin will save the UVdesk integration.
Now the admin will use Consumer Id at UVdesk admin panel configuration of Magento 2 SSO. SSO -> Add New Integration -> Edit(of the required integration) -> Client Credentials -> Consumer Id.
Now the admin will configure Magento 2 SSO at UVdesk admin panel.
- Store Name of the Magento 2.
- Consumer Id which was created at Magento 2 admin panel.
- Consumer Secret Key which was created at Magento 2 admin panel.
- Website URL of the Magento 2 store login.
After the successful integration of UVdesk to the Magento 2, the user will see an option of “Continue with Magento 2 User“. By this option, the user can sign-in to the UVdesk support portal of the admin.
After clicking the “Continue with Magento 2 User” button the user will be redirected to Magento store login.
Third party integration like (asp.net, Java, PHP, etc.)
Follow below steps to integrate the Magento 2 SSO with thridy party integration like asp.net, Java, PHP, etc.
1.) Create a button at the client end (like asp.net) to login from Magento. After hitting that button redirect to the following URL.
API to get the token
API Resource :
Description: get the token
Note: that redirect_uri and client_id is mandatory field append to URL
2.) After that, at API end(Magento end) client id will verify that the client is registered at Magento end or not? If the customer is registered then a login page will appear to log in.
After login, a page appears with authorize and cancel button. If authorized then a token will be provided and append in the redirect URL. But if the client is already login with some account then a page appears with authorize and cancel button.
If the client is not authorized then an error message will be shown or the user cancels to authorize then it redirects to redirect URL.
3.)After that client will hit again the Magento SSO module API with the provided token and client id
API to get the Magento user email information
API Resource :
Response: JWT encoded string or Array(with error key)
Description: get the user email information
if client_id and authtoken verified we send the customer email and name with the expiration of 2 minutes encoded by JWT using client secretkey else error will be provided in $response[‘error] form
The client has to decode the data using JWT via client secret key generated at Magento end with success or error field.
API to check the detail entered at client end (UVdesk, asp.net) correct or not
API Resource :
Description: check the detail entered at client end is correct?
That’s all for Magento 2 SSO module. If you still have any issue feel free to add a ticket and let us know your views to make the module better at webkul.uvdesk.com.
Current Product Version - 2.0.1
Supported Framework Version - 2.0.x, 2.1.x, 2.2.x