Skip to content

Commit

Permalink
Update Auth0 Social Connection (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
nmoskaleva authored Mar 26, 2024
1 parent a12b144 commit 993dc24
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/pages/verify/integrations/auth0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,21 @@ import CodeFlowSnippet from '../../../snippets/oauth2-code-flow.mdx';

You can leverage either an [Enterprise Connection](#enterprise-connection), or a [Custom Social Connection](#custom-social-connection) to connect Criipto Verify with Auth0.

### Enterprise Connection
### Login-method specific endpoints

To integrate Criipto Verify with Auth0, you create an Auth0 OpenID Connect connection to communicate with Criipto Verify. Because Auth0 will not pass the `acr_values` to Criipto Verify, you will have to create a new connection for every eID option that you intend to use. (`acr_values` is a parameter in the `/authorize` request to Criipto Verify needed to specify which kind of eID is requested)
To integrate Criipto Verify with Auth0, you create an Auth0 OpenID Connect(OIDC) connection to communicate with Criipto Verify. Because Auth0 will not pass the `acr_values` to Criipto Verify, you will have to create a new connection for every eID option that you intend to use. (`acr_values` is a parameter in the `/authorize` request to Criipto Verify needed to specify which kind of eID is requested).

For those cases, you can leverage our login-method specific metadata endpoints. Each of these contain an embedded and base64-encoded variant of the "raw" value normally supplied in the `acr_values`.
For those cases, you can leverage our login-method specific metadata endpoints (for [Enterprise Connections](#enterprise-connection)) and authorize URLs (for [Custom Social Connections](#custom-social-connection)). Each of these contain an embedded and base64-encoded variant of the "raw" value normally supplied in the `acr_values`.

Syntax:

- `https://yourdomain.criipto.id/BASE64(acr_values)/.well-known/openid-configuration`
- Issuer metadata endpoint: `https://yourdomain.criipto.id/BASE64(acr_values)/.well-known/openid-configuration`
- Authorize URL: `https://yourdomain.criipto.id/BASE64(acr_values)/oauth2/authorize`

For example, the `acr_values` of Norwegian BankID login method is `urn:grn:authn:no:bankid`. This translates to `dXJuOmdybjphdXRobjpubzpiYW5raWQ=` in base64 (UTF-8 charset), so the metadata endpoint will be:
For example, the `acr_values` of Norwegian BankID login method is `urn:grn:authn:no:bankid`. This translates to `dXJuOmdybjphdXRobjpubzpiYW5raWQ=` in base64 (UTF-8 charset), so the syntax will be:

- `https://yourdomain.criipto.id/dXJuOmdybjphdXRobjpubzpiYW5raWQ=/.well-known/openid-configuration`
- Issuer metadata endpoint: `https://yourdomain.criipto.id/dXJuOmdybjphdXRobjpubzpiYW5raWQ=/.well-known/openid-configuration`
- Authorize URL: `https://yourdomain.criipto.id/dXJuOmdybjphdXRobjpubzpiYW5raWQ=/oauth2/authorize`

#### Choose the specific login method

Expand All @@ -68,14 +70,16 @@ import LoginMethodsSnippet from '../../../snippets/login-methods-and-path-encode

<hr />

#### Create the OIDC connection(s)
### Enterprise Connection

You create an OIDC connection for every login method you intend to use.
You can connect Auth0 to Criipto Verify by creating an OIDC Enterprise Connection. You create an OIDC connection for [every login method](#login-method-specific-endpoints) you intend to use.

#### Create the OIDC connection(s)

1. Go to Auth0 dashboard for your tenant and under **Authentication** choose **Enterprise**.
2. Select **OpenID Connect** and create a new connection.
3. Enter **Connection name**.
4. Under **Issuer URL** enter the login-method specific URL, as described above.
4. Under **Issuer URL** enter the login-method specific URL, as described [above](#login-method-specific-endpoints).
5. Under **Client ID** enter the **Client ID/Realm** from your Criipto Verify application.
6. Copy the **Callback URL** generated by Auth0 and enter it under **Callback URLs** in Criipto Verify application management.
7. Back in the Auth0 dashboard, create a connection by clicking **Create**.
Expand Down Expand Up @@ -106,14 +110,14 @@ To test your OpenID Connect connection, go back to the list of all OpenID Connec

### Custom Social Connection

Alternatively, you can leverage a <a href="https://auth0.com/docs/authenticate/identity-providers/social-identity-providers/oauth2" target="_blank">Custom Social Connection</a> to integrate with Criipto Verify via OpenID Connect.
Alternatively, you can leverage a <a href="https://auth0.com/docs/authenticate/identity-providers/social-identity-providers/oauth2" target="_blank">Custom Social Connection</a> to integrate with Criipto Verify via OpenID Connect. Create an OIDC connection for [every login method](#login-method-specific-endpoints) you intend to use.

#### Create the OIDC connection
#### Create the OIDC connection(s)

1. Go to Auth0 dashboard for your tenant and under **Authentication** choose **Social**.
2. Select **Create Connection**, go to the bottom of the list, then choose **Create Custom**.
3. Enter **Connection name**.
4. Under **Authorization URL** enter the [authorize URL](https://docs.criipto.com/verify/guides/authorize-url-builder/) to which your users will be redirected to log in to your application, e.g. `https://yourdomain.criipto.id/oauth2/authorize?scope=openid&client_id=urn:criipto:samples:no1&redirect_uri=https://jwt.io&response_type=code`
4. Under **Authorization URL** enter a [login-method specific](#login-method-specific-endpoints) [authorize URL](https://docs.criipto.com/verify/guides/authorize-url-builder/) to which your users will be redirected to log in to your application, e.g. `https://yourdomain.criipto.id/oauth2/authorize/dXJuOmdybjphdXRobjpubzpiYW5raWQ=/?scope=openid&client_id=urn:criipto:samples:no1&redirect_uri=https://jwt.io&response_type=code`
5. Under **Token URL**, enter your token endpoint: `https://yourdomain.criipto.id/oauth2/token`
6. Under **Client ID** enter the **Client ID/Realm** from your Criipto Verify application.
7. Under **Client Secret** enter the **Client Secret** generated by Criipto Verify when you enabled the [OAuth2 Code Flow](##configure–the-oauth2-code-flow).
Expand Down

0 comments on commit 993dc24

Please sign in to comment.