SSO Integration: Student Portal to LMS
Let students who are logged in to your portal open the Edmingle LMS without logging in again, using a signed JWT.
This integration lets a student who is already logged in to your institution's portal open the Edmingle LMS without logging in again.
Your portal authenticates the student, generates a JWT and sends it to Edmingle. Edmingle verifies the student and returns their details, including an API key. Your portal then uses that API key as the edauthtoken to redirect the student into the LMS.
For this integration, the SSO setting that redirects users from the Edmingle LMS to your institution's portal must be turned off.
How the flow works
| Step | Component | What happens |
|---|---|---|
| 1 | Your portal | Generates a JWT containing the student's details. |
| 2 | Edmingle SSO API | Authenticates the student through a GET request. |
| 3 | Student API key | Your portal reads user.apikey from the API response. |
| 4 | LMS redirect | Your portal redirects the student to the LMS with the API key as the edauthtoken. |
Step 1: Generate the JWT
The student logs in to your portal as usual. When they choose to open Edmingle, your portal generates a JWT containing their details.
Sign the JWT with your Edmingle SSO Token using the HS256 algorithm. You can find the token in:
Admin Dashboard → Settings → Integration → Advanced
Example payload:
{
"first_name": "Johnny",
"last_name": "Rocket",
"email": "jrocket@example.com",
"contact_number": "99999999999"
}
The identity field the JWT must include depends on the primary login field configured for your institution: either the student's email address or their contact number.
Step 2: Send the JWT to Edmingle
Send the JWT to the Edmingle SSO API as the jwt query parameter.
Endpoint:
GET https://<your-institute>-api.edmingle.com/nuSource/api/v1/sso?jwt=<JWT>
Example request:
curl --location 'https://<your-institute>-api.edmingle.com/nuSource/api/v1/sso?jwt=<JWT>'
Edmingle validates the JWT and finds the matching student. If authentication succeeds, the API returns the student's Edmingle account details.
Step 3: Get the student's API key
A successful request returns a response like this:
{
"code": 200,
"message": "Login successful",
"user": {
"username": "johnny1234567",
"apikey": "<student-api-key>",
"user_id": 60510,
"role": 1,
"contact_number": "99999999999",
"email": "jrocket@example.com",
"is_sign_up": 0,
"expires_at": 1711709977075,
"server_key": "<server-key>",
"is_user_mfa_enabled": 0
}
}
The API key is in user.apikey. You use this value directly as the edauthtoken in the next step.
Step 4: Redirect the student to the LMS
Redirect the student's browser to your LMS account page, passing the API key as the edauthtoken:
https://<your-lms-domain>/v3/myaccount/?edauthtoken=<apikey>
For example, if the API returned the key c8a4d5f3xxxxxxxxxxxxxxxxxxxxxxxx, redirect the student to:
https://<your-lms-domain>/v3/myaccount/?edauthtoken=c8a4d5f3xxxxxxxxxxxxxxxxxxxxxxxx
The student is signed in and lands on their Edmingle LMS account page.
Summary
The student logs in to your portal.
Your portal generates a JWT signed with the Edmingle SSO Token.
Your portal sends the JWT to the Edmingle SSO API.
Edmingle authenticates the student and returns their API key.
Your portal redirects the student to the LMS with the API key as the
edauthtoken.The student lands directly on their Edmingle LMS account page.
Portal-to-LMS SSO vs. standard SSO
This guide covers the inbound flow only: your portal → Edmingle LMS.
The standard Edmingle SSO flow works the other way round (Edmingle LMS → your portal → Edmingle LMS): Edmingle sends the student to your SSO URL to authenticate. For that flow, see the standard SSO integration documentation.
API reference
For full request and response details, see the Edmingle SSO API documentation.