SSO
OneCompiler provides SSO integration for LMS platforms. You can use this feature to allow your users to sign-in to OneCompiler using your platform credentials.
When a user clicks on the SSO link, OneCompiler will validate the token and sign-in the user. If the user does not exist, OneCompiler will create a new user and sign-in. Following are the steps to integrate SSO with your LMS platform.
Route
Following is the URL SSO landing page URL
your-website.com/sso?token=<jwt-user-token-signed-with-lms-sso-secret>
How to generate token
Use provided LMS sso secret to sign the token and pass required user information to allow sign-in.
Example NodeJS code
import jwt from 'jsonwebtoken';
token = jwt.sign({ email: '[email protected]', name: 'John Doe' }, lmsSsoSecret);
Note: email, name are the mandatory fields.
Contact [email protected] to get your LMS SSO secret.