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
Auth0 requires an explicit definition of redirect urls during the signin process:
However, since every new branch of the docsite produces a new URL for the preview site, both auth0 needs to be updated to allow this redirect URL and the environment variables need to be updated on the preview to tell the site what the URL is that Vercel assigned to it. This makes previewing new builds too painful to set up.
There are three options I see:
Create a new branch called 'preview'. This will be a long-lived release branch alongside 'main'. anytime we want to preview a PR then it would be merged into 'preview'. This means the auth0 and Vercel setup for the 'preview' branch are one-time and static.
Pros: One-time set up
Cons: can't easily preview any PR, would have to merge to the 'preview' branch first. Could result in issues related to merging multiple things and adds more branch management work.
Create some hooks in Vercel that will update auth0 and vercel env variables on any new build.
Pros: any branch is easily previewable without ugly branch management concerns
Cons: up-front engineering work and a potentially long and ugly list of 'allowed callback urls' in auth0 which could be a pain to maintain properly.
Set up a special read of the environment and if we're in a 'preview' deployment then authentication is skipped all together.
Pros: probably simple to implement.
Cons: we remove the ability to test authentication concerns on preview builds.
The text was updated successfully, but these errors were encountered:
Auth0 requires an explicit definition of redirect urls during the signin process:
However, since every new branch of the docsite produces a new URL for the preview site, both auth0 needs to be updated to allow this redirect URL and the environment variables need to be updated on the preview to tell the site what the URL is that Vercel assigned to it. This makes previewing new builds too painful to set up.
There are three options I see:
Create a new branch called 'preview'. This will be a long-lived release branch alongside 'main'. anytime we want to preview a PR then it would be merged into 'preview'. This means the auth0 and Vercel setup for the 'preview' branch are one-time and static.
Pros: One-time set up
Cons: can't easily preview any PR, would have to merge to the 'preview' branch first. Could result in issues related to merging multiple things and adds more branch management work.
Create some hooks in Vercel that will update auth0 and vercel env variables on any new build.
Pros: any branch is easily previewable without ugly branch management concerns
Cons: up-front engineering work and a potentially long and ugly list of 'allowed callback urls' in auth0 which could be a pain to maintain properly.
Set up a special read of the environment and if we're in a 'preview' deployment then authentication is skipped all together.
Pros: probably simple to implement.
Cons: we remove the ability to test authentication concerns on preview builds.
The text was updated successfully, but these errors were encountered: