Search Results :

×

SAML Single Sign-On (SSO) For Laravel Using Google Apps As IDP


Laravel SAML Single Sign-On (SSO) plugin gives the ability to enable SAML 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 SAML compliant Identity providers. Here we will go through a step-by-step guide to configure Single Sign-On (SSO) between Laravel and Google Apps considering Google Apps as IdP.

Pre-requisites : Download And Installation

  • Open a Command Prompt window and change the working directory to your Laravel app's main directory.
  • Enter the below command.
    composer require miniorange/saml-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 https://<your-host>/mo_admin in the address bar.
  • 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 account by clicking the Register button to configure the plugin.
  • Laravel Single Sign On SSO plugin settings
  • After login, you will see the Service Provider Settings option, where you will get the service provider metadata. Keep the metadata handy as it will be required later to configure step 1.
  • Laravel Single Sign On SSO Service Provider Settings

Steps to configure Google Apps Single Sign-On (SSO) Login into Laravel

1. Configure Google Apps as Identity Provider

  • Go to https://admin.google.com and login with your G Suite administrator account.
  • Navigate to the Apps tab in the left menu and click on Web and mobile apps.
  • Configure Google Apps as IDP - SAML Single Sign-On(SSO) for laravel  - Google Apps SSO Login  Add SAML app
miniorange img Add a SAML App
  • Click on the Add App button, then in the dropdown select Add Custom SAML app tab to create a new saml app.
  • Configure Google Apps as IDP - SAML Single Sign-On(SSO) for laravel  - Google Apps SSO Login Setup own custom app
  • Enter details for your custom SAML app and click on Continue button.
  • Configure Google Apps as IDP - SAML Single Sign-On(SSO) for laravel  - Google Apps SSO Login, Setup own custom app1
miniorange img IDP Information
  • Click on Download Metadata button. This will be used for configuring your laravel saml plugin.
  • You can also copy G Suite details like SSO URL, entity ID and Certificate to configure the Service Provider manually and then click on Continue button.
  • Configure Google Apps as IDP - SAML Single Sign-On(SSO) for laravel  - Google Apps SSO Login, SAML custom app Basic Information
miniorange img Service Provider Details
  • Enter details from the Service Provider Metadata tab in the SAML SP plugin.
  • ACS URL Copy and paste the ACS URL from the plugin.
    Entity ID Copy and paste the SP Entity ID/ Issuer from the plugin.
    Signed Response Check Signed Response
    Name ID Format EMAIL
  • Click on Continue button.
  • Configure Google Apps as IDP - SAML Single Sign-On(SSO) for laravel  - Google Apps SSO Login, Service provider details
miniorange img Attribute Mapping
  • Click on Add Mapping button.
  • Configure Google Apps as IDP - SAML Single Sign-On(SSO) for laravel  - Google Apps SSO Login, Attribute mapping details
  • Add and select user fields in Google Directory, then map them to Service Provider attributes and Click on Finish button.
  • Configure Google Apps as IDP - SAML Single Sign-On(SSO) for laravel  - Google Apps SSO Login, Attribute mapping details
miniorange img User Access to Configured App
  • Go to SAML Apps again and click on OFF for everyone .
  • Configure Google Apps as IDP - SAML Single Sign-On(SSO) for laravel  - Google Apps SSO Login, Turn-On go to SAML Apps
  • Then, select ON for everyone to activate SSO.
  • Configure Google Apps as IDP - SAML Single Sign-On(SSO) for laravel  - Google Apps SSO Login, Turn-On go to SAML Apps 1
  • You have successfully configured G Suite / Google Apps as SAML IdP (Identity Provider) for achieving
    G Suite / Google Apps SSO login into your laravel site.

2. Configure Laravel SAML plugin as Service Provider

  • Go to the miniOrange Laravel SAML 2.0 SSO plugin and click on Choose File button next to the Upload Meatadata option.
  • Select the metadata file we downloaded from the google apps and click on Upload button.
  • Laravel Single Sign On SSO Identity Provider Settings
  • Click on Test Configuration button to test whether the SAML Configuration you've done is correct. On successful test configuration, you will get the different user attributes returned by your identity Provider in a test configuration table.
  • Laravel Single Sign On SSO Test Configuration Laravel Single Sign On SSO Test Result

3. SSO Options

  • Your users can initiate the Single Sign On flow by clicking on the Single Sign On button generated on your login page. If you do not have this page yet, run the below commands to generate the authentication module.

      composer require laravel/ui

      php artisan ui vue --auth

      npm install && npm run dev

      php artisan migrate


  • Laravel Single Sign On SSO Single Sign On button

In this Guide, you have successfully configured Google Apps SAML Single Sign-On (Google Apps SSO Login) choosing Google Apps as IdP and Laravel as SP using miniOrange plugin-SAML Single Sign On – SSO Login. This solution ensures that you are ready to roll out secure access to your Laravel site using Google Apps login credentials within minutes.

Additional Resources

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