Edjet LMS Server 6.4

Setup OAuth sign in (via Google, Linkedin, Facebook)

Superadmin info

Edjet LMS support the OAuth standard that allow user to can sign in into Edjet LMS using third party services.

Supported identity providers:

  • Google
  • Facebook
  • LinkedIn

OAuth setup require the Edjet LMS to use https protocol.

The user account being authenticated has to exist in the Edjet LMS database.

Setup the OAuth connector

This setup require to configure server-side rewrite.

All other setting and options of the OAuth connector can be managed in the admin panel.

To setup OAuth authentication:

  1. Sign in to Edjet LMS admin.
  2. In the menu click settings Settings and then click settings_applications System
  3. Click tab OAuth.
  4. To enable Google identity provider, click option Enable authentication via Google.
  5. To enable Facebook identity provider, click option Enable authentication via Facebook.
  6. To enable Linkedin identity provider, click option Enable authentication via Linkedin.
  7. Enter identity provider settings and credentials.
    See settings and options below.
  8. In the toolbar click save Save.

Settings and options

Setting Options and description
google_client_id Google client ID (generated in google API manager)
google_client_secret Google client secret (generated in google API manager)
facebook_app_id Facebook application ID (generated in facebook application manager)
facebook_app_secret Facebook application secret key (generated in facebook application manager)
linkedin_api_key LinkedIn client ID (generated in linkedIn application manager)
linkedin_secret_key LinkedIn secret key (generated in linkedIn application manager)

Obtain OAuth 2.0 credentials from 3rd party IdP

To get credentials from 3rd party identity provider (IdP) to use them in OAuth authentication setup, you will need to have account of each identity provider you want to use.

Some providers do require specific account type (developer) and usually you need to verify your account before you can begin.

Google

Documentation: https://developers.google.com/identity/protocols/oauth2

Notes:

  • You will have to create a Google APIs project.
  • You do not have to enable any services from the Services tab.
  • Just create an OAuth 2.0 client ID (under Credentials).
  • Choose Web application for Application type
  • Make sure that redirect URI is set to:
    https://<hostname>/login/google/oauth2callback

Facebook

Documentation: https://developers.facebook.com/docs/apps/register

Notes:

  • You will have to create (register) a Facebook application.
  • Choose WWW (website) platform.
  • Make sure that redirect URI is set to:
    https://<hostname>/login/facebook/int_callback

LinkedIn

Documentation: https://docs.microsoft.com/en-us/linkedin/shared/authentication/client-credentials-flow

Notes:

  • You will have to create (register) a Linkedin application.
  • Make sure that redirect URI is set to:
    https://<hostname>/login/linkedin/oauth2callback

Setup server rewrites

If you are using Edjet LMS in the cloud, please contact Edjet Support.

Add these rewrite rules as first rules to the .htaccess file:

RewriteRule ^login/google$ /login [L,QSA]
RewriteRule ^login/google/oauth2callback(.*)$ /login$1 [L,QSA]
RewriteRule ^login/facebook$ /login [L,QSA]
RewriteRule ^login/facebook/int_callback(.*)$ /login$1 [L,QSA]
RewriteRule ^login/linkedin$ /login [L,QSA]
RewriteRule ^login/linkedin/oauth2callback(.*)$ /login$1 [L,QSA]
Connect external services