Step by Step Guide to enable OAuth Single Sign-On (SSO) for Laravel

Step by Step Guide to enable OAuth Single Sign-On (SSO) for Laravel


miniOrange Laravel oauth client Package supports all known IdPs - Azure AD, Azure B2C, Discord, WHMCS, AWS Cognito, Keycloak, Okta, Clever, Salesforce, WordPress, etc .


We provide Laravel Single Sign-On (SSO) with multiple IdPs, you can find some popular providers below

Azure AD

Azure B2C

WordPress

Discord

keycloak

Not able to find your OAuth provider? Please click Here to contact us and we'll help you set it up.

1. Installing the package using Composer

  • Open a Command Prompt window and change the working directory to your Laravel app’s main directory.
  • Enter the command composer require miniorange/oauth-laravel-free

  • Laravel Single Sign On SSO enter commond
  • Note: If you are using Laravel 5.4 or below, you will need to add the following value to the 'providers' array in your app.php file which can be found in the project\config folder :provider\ssoServiceProvider::class

  • You can check your current Laravel version by using the command php artisan --version.

  • Laravel Single Sign On SSO add following value
  • After successful installation of package, go to your Laravel app in the browser and enter http://<your-laravel-domain>/mo_oauth_admin in the address bar.
  • The package will start setting up your database for you and then redirect you to the admin registration page.
  • Login with credentials you registered with.
  • Laravel Single Sign On SSO package settings

  • 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 package.
  • Laravel Single Sign On SSO oauth Provider Settings

2. Configuring the Laravel OAuth SSO package

  • Go to the package and Select package Settings tab from the navigation panel on the left.
  • You can choose an OAuth Provider from the dropdown (if your OAuth Provider is not mentioned, you can opt for Other in the list).
  • You need to provide the Redirect/Callback URL while configuring your OAuth Provider.
  • Use your OAuth Provider details like Client ID and Client Secret to configure the package.
  • Laravel Single Sign On SSO oauth Provider Settings
  • After that, you can enter the Scope, Authorization Endpoint, Access Token Endpoint, GetUserinfo Endpoint, Realm, Domain, Tenant, (as per your OAuth Provider or use the default ones provided already).
  • You can send the client credentials in header or body and also send state parameter accordingly.
  • Laravel Single Sign On SSO oauth Provider Settings
  • Click on the Save button to save your configuration.

3. Test Configuration

  • Once you configured all the details, You can test if the package is configured properly or not by clicking on the Test Configuration button.
  • Laravel Single Sign On SSO Test Configuration
  • If the configuration is correct, you should see a Test Successful screen with the user's attribute values.
  • Laravel Single Sign On SSO Test Result

4. SSO Options

  • Your users can initiate the Single Sign On flow by using <your-laravel-domain>/ssologin.php?option=oauthredirect
  • You can create your own Single Sign On link. Make sure it redirects you to the SSO link : Refer to the example given below :
  • <a href="ssologin.php?option=oauthredirect">Single Sign On</a>

5. Support / Demo

  • Support and Trial/Demo Request tabs are available for customers to reach out to for demos and support.
  • Laravel Single Sign On SSO Single Sign On button Laravel Single Sign On SSO Single Sign On button

If you don't find what you are looking for, please contact us at laravelsupport@xecurify.com or call us at +1 978 658 9387 to find an answer to your question about MiniOrange Laravel Oauth.

Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com