This article explains how to configure OAuth 2.0 as part of your Shared Accounts authentication method.

Note: Some OAuth 2.0 implementations may differ. Contact us at any point in the setup if your implementation differs or if you encounter errors while testing.

OAuth 2.0 Flow

Northpass supports OAuth 2.0 as an SSO integration, specifically the Authorization Code Grant flow. Click here to learn more.

Roles

The roles are outlined below. Click here to learn more.

  • Client : Northpass
  • Resource owner : Learner
  • Resource server : You company server
  • Authorization server : Your company server

Flow

  1. Learner visits Northpass school website (eg. https://your-school.northpass.com)
  2. Learner is redirected to the Authorization server “Authorize Endpoint” to authenticate and authorize. This is known as the “Authorization Request” and is described here.
  3. After successful authentication and authorization, the learner is redirected back to Northpass. This is known as the “Authorization Response” as is described here. As explained, the redirect URL is provided by the “Authorization Request”.
  4. In step 3), when the learner is redirected back to Northpass, Northpass will use the “authorization code” received in step 3) to obtain an access token from the “Token Endpoint”. This happens behind the scenes, and the learner will not see this happening. This is known as the “Access Token Request” and is described here.
  5. The “Authorization Server” will return an access token. This is known as the “Access Token Response” and is described here.
  6. Northpass will then use the access token returned in step 5) to access learner details from the Resource server at the configured “Users API Endpoint”. This is basically an API request for an individual resource. This request is not specified in the OAuth specification (other than utilizing the access token). This is described here.
  7. Northpass will use the response from step 6) to identify the learner and create a session on Northpass for that learner. The learner will now be logged in to Northpass.

Integration Steps

The flow described above is the basic OAuth 2.0 Authorization Code Grant flow. There are details in each step of the flow that can change from implementation to implementation.

Authorize Request

  • The “redirect_uri” is optional, but Northpass will always provide it.

Token Request

  • The method of client authentication needs to be established. By default, Northpass will use Basic Authentication, uses the “Client Identifier” and “Client Secret”.

User API Endpoint Request

  • The method of authentication and format of returned data needs to be established so that Northpass can parse the incoming learner data. By default, Northpass assumes JSON, and a format as follows:

{

‘id’: UNIQUE_LEARNER_ID,

‘first_name’: LEARNER_FIRST_NAME,

‘last_name’: LEARNER_LAST_NAME,

‘email’: LEARNER_EMAIL

}

Configuration in Northpass

Step 1

Click on Account in the top navigation bar and select School Settings.

Step 2

Click on the Authentication tab.

Step 3

Click Edit.

Step 4

Review the options in the modal and click Continue.

Step 5

Select Shared Accounts from the dropdown.

Step 6

Select OAuth 2.0.

Step 7

Enter your Client Identifier. This value is provided by Authorization server and is specific to Northpass. Click here to learn more about this value.

Step 8

Enter your Client Secret. This value is provided by Authorization server and is specific to Northpass. Click here to learn more about this value.

Step 9

Enter your Authorize Endpoint. This is provided by Authorization server configuration. It should be the same for all of your OAuth integrations. Click here to learn more about this endpoint.

Step 10

Enter your Token Endpoint. This is provided by Authorization server configuration. It should be the same for all of your OAuth integrations. Click here to learn more about this endpoint.

Step 11

Enter your Users API Endpoint. This is provided by Resource server configuration. This is not specific to OAuth. It is an API endpoint, that can be used to retrieve information about a single learner with the token received from the Token Endpoint. Click here to learn more about this endpoint.

Step 12

Enter a URL that you’d like the learner to be redirected to when they click “Log Out” from your school website.

Step 13

Enter your company website.

Step 14 (Optional)

Choose a default group. If a default group is selected, then all learners who access the school will be added into the default group and gain access to the courses within the default group. Click here to learn more about managing course access.

Step 15

Click Save.

Step 16

Get started sharing links to your school. Anyone with an account in your system will be able to authenticate upon visiting your school. Learners will only see the courses that they have been granted access to. Click here to learn more about managing course access.

Learn more about optionally managing group access via your OAuth 2.0 solution or about managing locales via your OAuth 2.0 solution.

Click here to see all articles related to Authentication

Did this answer your question?