You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| additionalAuthParameters |`Record<string, string>` (optional) | - | Additional parameters to be added to the authorization request. See [Provider specific configurations](#provider-specific-configurations) for possible parameters. |
436
436
| additionalTokenParameters |`Record<string, string>` (optional) | - | Additional parameters to be added to the token request. See [Provider specific configurations](#provider-specific-configurations) for possible parameters. |
437
437
| baseUrl |`string` (optional) | - | Base URL for the provider, used when to dynamically create authorizationUrl, tokenUrl, userInfoUrl and logoutUrl if possible. |
438
-
| openIdConfiguration |`Record<string, unknown>` or `function (config) => Record<string, unknown>` (optional) | - | OpenID Configuration object or function promise that resolves to an OpenID Configuration object. |
438
+
| openIdConfiguration |`string` or `Record<string, unknown>` or `function (config) => Record<string, unknown>` (optional) | - | OpenID Configuration url, object or function promise that resolves to an OpenID Configuration object. |
| validateIdToken |`boolean` (optional) |`true`| Validate id token. |
441
441
| encodeRedirectUri |`boolean` (optional) |`false`| Encode redirect uri query parameter in authorization request. Only for compatibility with services that don't implement proper parsing of query parameters. |
@@ -476,29 +476,95 @@ The following options are available on every provider as overrides for the globa
476
476
477
477
Some providers have specific additional fields that can be used to extend the authorization or token request. These fields are available via. `additionalAuthParameters` or `additionalTokenParameters` in the provider configuration.
478
478
479
-
:warning: Tokens will only be validated if the `clientId` or the optional `audience` field is part of the access_tokens audiences. Even if `validateAccessToken` or `validateIdToken` is set, if the audience doesn't match, the token should not and will not be validated.
479
+
⚠️ Tokens will only be validated if the `clientId` or the optional `audience` field is part of the access_tokens audiences. Even if `validateAccessToken` or `validateIdToken` is set, if the audience doesn't match, the token should not and will not be validated.
480
+
481
+
The `redirectUri` property is always required.
480
482
481
483
### Auth0
482
484
483
-
additionalAuth/TokenParameters:
485
+
**Provider support:**
486
+
487
+
✅ PKCE<br>
488
+
❌ Nonce<br>
489
+
✅ State<br>
490
+
✅ Access Token validation<br>
491
+
❌ ID Token validation<br>
492
+
493
+
**Instructions**
494
+
495
+
Additional parameters to be used in additionalAuthParameters,
496
+
additionalTokenParameters or additionalLogoutParameters:
484
497
485
498
| Option | Type | Default | Description |
486
499
|---|---|---|---|
487
-
| connection |`string`| - | Optional. Specifies the connection. |
488
-
| organization |`string`| - | Optional. Specifies the organization. |
489
-
| invitation |`string`| - | Optional. Specifies the invitation. |
| connection |`string`| - | Optional. Forces the user to sign in with a specific connection. For example, you can pass a value of github to send the user directly to GitHub to log in with their GitHub account. When not specified, the user sees the Auth0 Lock screen with all configured connections. You can see a list of your configured connections on the Connections tab of your application. |
501
+
| organization |`string`| - | Optional. ID of the organization to use when authenticating a user. When not provided, if your application is configured to Display Organization Prompt, the user will be able to enter the organization name when authenticating. |
502
+
| invitation |`string`| - | Optional. Ticket ID of the organization invitation. When inviting a member to an Organization, your application should handle invitation acceptance by forwarding the invitation and organization key-value pairs when the user accepts the invitation. |
503
+
| loginHint |`string`| - | Optional. Populates the username/email field for the login or signup page when redirecting to Auth0. Supported by the Universal Login experience. |
504
+
| audience |`string`| - | Optional. The unique identifier of the API your web app wants to access. |
505
+
506
+
Depending on the settings of your apps `Credentials` tab, set `authenticationScheme` to `body` for 'Client Secret (Post)', set to `header` for 'Client Secret (Basic)', set to `''` for 'None'
507
+
508
+
### AWS Cognito
509
+
510
+
**Provider support:**
491
511
492
-
- Depending on the settings of your apps `Credentials` tab, set `authenticationScheme` to `body` for 'Client Secret (Post)', set to `header` for 'Client Secret (Basic)', set to `''` for 'None'
512
+
✅ PKCE<br>
513
+
✅ Nonce<br>
514
+
✅ State<br>
515
+
❌ Access Token validation<br>
516
+
❌ ID Token validation<br>
517
+
518
+
AWS Congito doesn't correctly implement the OAuth 2 standard and doesn't provide a `aud` field for the audience. Therefore it is not possible to verify the access or id token.
519
+
520
+
**Instructions**
521
+
522
+
For AWS Cognito you have to provide at least the `baseUrl`, `clientId`, `clientSecret` and `logoutRedirectUri` properties. The `baseUrl` is used to dynamically create the `authorizationUrl`, `tokenUrl`, `logoutUrl` and `userInfoUrl`.
523
+
The only supported OAuth grant type is `Authorization code grant`.
524
+
The final url should look something like this `https://cognito-idp.eu-north-1.amazonaws.com/eu-north-1_SOMEID/.well-known/openid-configuration`.
525
+
You will also encounter an error, if you have not correctly registered the `redirectUri` under "Allowed callback URLs" or the `logoutRedirectUri` under "Allowed sign-out URLs".
526
+
If you need additional scopes, specify them in the `scope` property in you nuxt config like `scope: ['openid', 'email', 'profile'],`.
493
527
494
528
### Entra ID/Microsoft
495
529
530
+
**Provider support:**
531
+
532
+
✅ PKCE<br>
533
+
✅ Nonce<br>
534
+
✅ State<br>
535
+
⚠️ Access Token validation (Supported, but disabled as only possible for custom audience tokens)<br>
536
+
✅ ID Token validation<br>
537
+
538
+
**Instructions**
539
+
540
+
Additional parameters to be used in additionalAuthParameters,
541
+
additionalTokenParameters or additionalLogoutParameters:
542
+
543
+
| Option | Type | Default | Description |
544
+
|---|---|---|---|
545
+
| resource |`string`| - | Optional. The resource identifier for the requested resource. |
546
+
| audience |`string`| - | Optional. The audience for the token, typically the client ID. |
547
+
| prompt |`string`| - | Optional. Indicates the type of user interaction that is required. Valid values are login, none, consent, and select_account. |
548
+
| loginHint |`string`| - | Optional. You can use this parameter to pre-fill the username and email address field of the sign-in page for the user. Apps can use this parameter during reauthentication, after already extracting the login_hint optional claim from an earlier sign-in. |
549
+
| logoutHint |`string`| - | Optional. Enables sign-out to occur without prompting the user to select an account. To use logout_hint, enable the login_hint optional claim in your client application and use the value of the login_hint optional claim as the logout_hint parameter. |
550
+
| domainHint |`string`| - | Optional. If included, the app skips the email-based discovery process that user goes through on the sign-in page, leading to a slightly more streamlined user experience. |
551
+
496
552
If you want to validate access tokens from Microsoft Entra ID (previously Azure AD), you need to make sure that the scope includes your own API. You have to register an API first and expose some scopes to your App Registration that you want to request. If you only have GraphAPI entries like `openid`, `mail` GraphAPI specific ones in your scope, the returned access token cannot and should not be verified. If the scope is set correctly, you can set `validateAccessToken` option to `true`.
497
553
498
-
If you use this module with Entra ID for Customers make sure you have set the `audience` config field to your application id, otherwise it will not be possible to get a valid OpenID Connect well-known configuration and thereby verify the JWT token.
554
+
If you use this module with Entra External ID (previously Entra ID for Customers) make sure you have set the `audience` config field to your application id, otherwise it will not be possible to get a valid OpenID Connect well-known configuration and thereby verify the JWT token.
499
555
500
556
### GitHub
501
557
558
+
**Provider support:**
559
+
560
+
❌ PKCE<br>
561
+
❌ Nonce<br>
562
+
✅ State<br>
563
+
❌ Access Token validation<br>
564
+
❌ ID Token validation<br>
565
+
566
+
**Instructions**
567
+
502
568
GitHub is not strictly an OIDC provider, but it can be used as one. Make sure that validation is disabled and that you keep the `skipAccessTokenParsing` option to `true`.
503
569
504
570
Try to use a [GitHub App](https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/differences-between-github-apps-and-oauth-apps), not the legacy OAuth app. They don't provide the same level of security, have no granular permissions, don't provide refresh tokens and are not tested.
@@ -507,8 +573,31 @@ Make sure to set the callback URL in your OAuth app settings as `<your-domain>/a
507
573
508
574
### Keycloak
509
575
510
-
For Keycloak you have to provide at least the `baseUrl`, `clientId` and `clientSecret` properties. The `baseUrl` is used to dynamically create the `authorizationUrl`, `tokenUrl` and `userInfoUrl`.
576
+
**Provider support:**
577
+
578
+
✅ PKCE<br>
579
+
✅ Nonce<br>
580
+
❌ State<br>
581
+
✅ Access Token validation<br>
582
+
❌ ID Token validation<br>
583
+
584
+
**Instructions**
585
+
586
+
Additional parameters to be used in additionalAuthParameters,
587
+
additionalTokenParameters or additionalLogoutParameters:
588
+
589
+
| Option | Type | Default | Description |
590
+
|---|---|---|---|
591
+
| realm |`string`| - | Optional. This parameter allows to slightly customize the login flow on the Keycloak server side. For example, enforce displaying the login screen in case of value login. |
592
+
| realm |`string`| - | Optional. Used to pre-fill the username/email field on the login form. |
593
+
| realm |`string`| - | Optional. Used to tell Keycloak to skip showing the login page and automatically redirect to the specified identity provider instead. |
For more information on these parameters, check the [KeyCloak documentation](https://www.keycloak.org/docs/latest/securing_apps/#methods).
597
+
598
+
For Keycloak you have to provide at least the `baseUrl`, `clientId` and `clientSecret` properties. The `baseUrl` is used to dynamically create the `authorizationUrl`, `tokenUrl`, `logoutUrl` and `userInfoUrl`.
511
599
Please include the realm you want to use in the `baseUrl` (e.g. `https://<keycloak-url>/realms/<realm>`).
600
+
If you don't want to use the post logout redirect feature of key cloak, set `logoutUrl` to `undefined` or `''`.
512
601
Also remember to enable `Client authentication` to be able to get a client secret.
513
602
514
603
## Dev mode
@@ -543,7 +632,7 @@ The properties on the generated token are
:warning: The access token will be generated with a fixed local secret and can in no way be considered secure. Dev mode can only be enabled in local development and should exclusively be used there for testing purposes. Never set any environment variables on your production systems that could put any component into development mode.
635
+
⚠️ The access token will be generated with a fixed local secret and can in no way be considered secure. Dev mode can only be enabled in local development and should exclusively be used there for testing purposes. Never set any environment variables on your production systems that could put any component into development mode.
0 commit comments