We are encountering an issue while logging in through Auth0 using a custom domain. The login flow initiates correctly, but upon redirection, the session values are coming back as null.
We are using the following code snippet to configure Auth0 WebAuth:
export const webAuthDragonApp = (config: AuthEnvironmentVariables) => {
const domain = config[‘NEXT_PUBLIC_AUTH0_DOMAIN’];
const clientID = config[‘NEXT_PUBLIC_CLIENT_AUTH0_CLIENT_ID’];
const redirectUri = config[‘NEXT_PUBLIC_CLIENT_AUTH0_LOGIN_REDIRECT_URL’];
const responseType = config[‘NEXT_PUBLIC_RESPONSE_TYPE’];
if (!domain || !clientID || !redirectUri || !responseType) {
return null;
}
return new WebAuth({
domain,
clientID,
redirectUri,
responseType,
overrides: {
__tenant: 'dev', // Your actual Auth0 tenant name
__token_issuer: '<My Custom Domain>/'
}
});
};