I have custom domain installed for my tenant, which works fine excluding certain scenarios.
- I have created an account with say firstname.lastname@example.org, via google sign in.
- Now, I log out of my application (but I am still signed in with that email inside google chrome).
- Now, I use that email to do a normal sign up, which will send me a verification email, when I click the verification link in the email, I get redirected to the old domain/tenant name and since its not there (As I have the new custom domain set inside AUTH0_ISSUER_BASE_URL), I see an unauthorized message.
Also if I revert back to the old tenant domain(inside AUTH0_ISSUER_BASE_URL), the above flow works.
Also after getting redirected if, I manually replace the old domain with the custom domain, and refresh the page, it works.
I have followed auth0 docs, in setting up the custom domain and am using the nextjs-auth0 package.
Not sure what’s going on.