Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added useCustomAuth0Domain flag #1821

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added useCustomAuth0Domain flag
openid-configuration now contains an optional flag to allow
 custom domains in auth0 to function as normal.
 A small change in the url service checks if the authority ends
 with auth0.com OR the useCustomAuth0Domain is set.
  • Loading branch information
fredhair committed Aug 16, 2023
commit 440b1daf255737be757f79dbb42cd694c99d2bf2
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ export interface OpenIdConfiguration {
* By entering a value, you can renew the tokens before the tokens expire.
*/
renewTimeBeforeTokenExpiresInSeconds?: number;
/**
* Allows for a custom domain to be used with Auth0.
* With this flag set the 'authority' does not have to end with
* 'auth0.com' to trigger the auth0 special handling of logouts.
*/
useCustomAuth0Domain?: boolean;
/**
* When set to true, refresh tokens are used to renew the user session.
* When set to false, standard silent renew is used.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -796,13 +796,13 @@ export class UrlService {
}

private isAuth0Endpoint(configuration: OpenIdConfiguration): boolean {
const { authority } = configuration;
const { authority, useCustomAuth0Domain } = configuration;

if (!authority) {
return false;
}

return authority.endsWith(AUTH0_ENDPOINT);
return authority.endsWith(AUTH0_ENDPOINT) || useCustomAuth0Domain;
}

private composeAuth0Endpoint(configuration: OpenIdConfiguration): string {
Expand Down