Laravel OAuth client Single Sign-On (SSO) plugin gives the ability to enable OAuth Single Sign-On for your laravel applications. Using Single Sign-On you can use only one password to access your laravel application and services. Our plugin is compatible with all the OAuth compliant Identity providers. Here we will go through a step-by-step guide to configure Single Sign-On (SSO) between Laravel and miniOrange considering miniOrange as OAuth provider. To know more about other features we provide in Laravel OAuth single-sign-on-sso plugin, you can
click here.
Installation Laravel Oauth Client
- Open a Command Prompt window and change the working directory to your Laravel app's main directory.
- Enter the below command.
composer require miniorange/oauth-laravel-free
- After successful installation of package, go to your Laravel app in the browser and enter
{laravel-application-domain}/mo_oauth_admin
- The package will start setting up your database for you and then redirect you to the admin registration page.
- Register or log in with your miniOrange account to configure the plugin.
- After login, you will see the OAuth provider Settings option, where you will get the Redirect/Callback URL. Keep it handy as it will be required later to configure laravel OAuth Single Sign-On SSO plugin.
Steps to configure miniOrange Single Sign-On (SSO) Login into Laravel
1. Configure miniOrange as OAuth Provider
- Sign in to miniOrange dashboard.
- To set the branding, Go to Customization from the left menu and go to Login and Registration Branding tab.
- Under the Basic Settings change the Organization Name and click on Save.
- On the dashboard, go to Apps and click on Add Application.
- Click on the OAuth / OIDC tab and select OAuth2/OpenID Connect to create an application.
- Enter the Client Name and Redirect URL. Copy Redirect / Callback URL from the laravel oauth plugin to Configure Login Redirect URL.
- For your created application, Go to Select → Edit under the Action tab.
- Now, Go to App → basic settings copy Client ID and Client Secret for the application. Copy these credentials for laravel OAuth Plugin configuration on corresponding fields.
2. Configure Laravel OAuth plugin as OAuth Client
- Go to the miniOrange Laravel OAuth SSO plugin and click on Choose miniorange as OAuth provider.
- Enter the Client ID and Client Secret copy from miniorange app basic settings.
- Please refer the below table for configuring the Scope and Endpoints or else after selecting miniorange scope and Endpoints will added automatically in there respective fields :
Scope: |
Openid |
Authorize Endpoint: |
https://login.xecurify.com/moas/idp/openidsso |
Access Token Endpoint: |
https://login.xecurify.com/moas/rest/oauth/token |
Get UserInfo Endpoint: |
https://login.xecurify.com/moas/rest/oauth/getuserinfo |
- Now, You can send the client credentials in header or body and also send state parameter accordingly also enter login attribute as per your requirement.
- Click on save settings button. After that, Click on test configuration button. you will get the list of Attribute Names and Attribute Values that are sent by your OAuth provider
3. SSO Options
- You can also use a link to login via your OAuth/OpenID provider.
- This link is in the format:
{laravel-application-domain}/ssologin.php?option=oauthredirect
4. Support / Demo
- Support and Trial/Demo Request tabs are available for customers to reach out to for demos and support.
In this Guide, you have successfully configured miniOrange Single Sign-On (SSO) using Laravel as OAuth Client. This solution ensures that you are ready to roll out secure access to your Laravel site using miniOrange login credentials within minutes.
Additional Resources