Open ID Connect (OIDC)
Learn about Authsignal’s OIDC integration model.
Authsignal’s OIDC integration allows clients to federate passwordless and MFA flows to Authsignal, securely returning back the outcome of the authentication challenge through a set of claims.
Overview
The Authsignal OIDC flows extends the OIDC protocol in two ways:
-
The authorization endpoint (
/oidc/auth
) will only work within the scope of an already identified resource owner - typically a user ID. This extension requires a short-lived token to be generated before redirecting the resource owner to the authorization endpoint. The endpoint to obtain a short-lived token is our init auth endpoint (/init-auth
). This token can then be appended to the authorization endpoint (/oidc/auth
) as atoken
URL param. -
When redirecting back to the resource owner, Authsignal will always respond with a
authorization_code
grant type regardless of the outcome of the challenge. It is important for the client to exchange theauthorization_code
for an access token via our token endpoint (/oidc/token
) and then inspect theaction_state
claim to determine the result of the challenge.
There are 3 key endpoints:
- Init endpoint (
/init-auth
) - OIDC authorize endpoint (
/oidc/auth
) - OIDC token endpoint (
/oidc/token
)
Regions
The OIDC API is served on the connect.authsignal.com
domain and is available in 3 regions.
Region | API URL |
---|---|
US (Oregon) | https://connect.authsignal.com |
AU (Sydney) | https://au-connect.authsignal.com |
EU (Dublin) | https://eu-connect.authsignal.com |
Init endpoint
POST /init-auth
The init endpoint is a prerequisite before redirecting the user to the OIDC Authorize endpoint.
This endpoint allows the authorize endpoint to scope the flow to a single userId
and add important metadata to facilitate the Authsignal rules engine to make decisions like whether challenge flows should be performed.
Request
Field | Description |
---|---|
userId | The unique ID for this user in your database. |
action | The code of the action (e.g signIn , manageAuthenticators ). |
appId | The clientId or appId in the context of the calling identity provider. |
scope | The scopes being requested by the calling identity provider, formatted as a space-separated list. |
custom | A custom JSON object in which you can pass your own data points. Rules can be used to match against these data points. |
redirectToSettings | A flag indicating whether to redirect to the Authsignal self-service management screens where the user can add and remove authenticators. |
Response
Field | Description |
---|---|
token | The short-lived token to be appended to the OIDC authorize GET request. |
OIDC Configuration endpoint
GET /oidc/.well-known/openid-configuration
This endpoint is the standard configuration endpoint which can be used to determine the provider’s other endpoints and metadata.
OIDC Authorize endpoint
GET /oidc/auth
This endpoint is used to interact with the resource owner and get the authorization to access the protected resource.
It’s compulsory to pass the token
url param in the request alongside the other compulsory OIDC parameters.
This token would have been generated using the /init-auth
call prior.
Request
Field | Description |
---|---|
clientId | The Authsignal tenant ID. |
token | The short-lived token generated via /init-auth . |
redirect_uri | All responses from this endpoint result in a redirect to this URI. |
state | The OAuth state parameter. If this is set in the request then it will be returned to the application as part of the redirect_uri. |
OIDC Token endpoint
POST /oidc/token
This endpoint is used by the client application to obtain an access token.
Expect to always call this endpoint and determine the state of the Authsignal challenge/auth flow by inspecting the action_state
claim.
Request
Field | Description |
---|---|
grant_type | The grant type for the OIDC flow. Authsignal only supports authorization_code . |
code | The authorization code returned via the redirect back from the authorization endpoint. |
client_id | The Authsignal tenant ID. |
client_secret | The Authsignal tenant secret. |
Response
Field | Description |
---|---|
access_token | The access token container the JWT claims including the action_state claim. |
action_code | The action code that was initiated by the current challenge. |
action_verification_method | The verification method used to complete the challenge. Only available if the challenge was completed |
is_enrolled | Indicates whether the user has enrolled at least one authenticator. |
The access token contains the action_state
claim. The following is an example of the claim’s data payload.
To evaluate the decision, check the value of the action_state
claim.
If the value is CHALLENGE_SUCCEEDED
or ALLOW
continue with processing.
If CHALLENGE_FAILED
or BLOCK
is returned, termimate any additional authentication processes.
Was this page helpful?