-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
🛂 authAuthentication stuff using NextAuthAuthentication stuff using NextAuth
Milestone
Description
Summary
We need different pairs of OAuth keys for deploying our application on each place. Meaning we have 1 pair of keys for our Vercel deployment, one pair of keys for Railway deployment, and also one pair of keys for local development.
Wait what's the issue then?
Try logging in from our Railway deployment, you'll see that it 'redirects' us to our Vercel deployment cus we are currently using the Vercel deployment GitHub OAuth keys in Railway right now. That's not good.
Task
- Head to GitHub's settings and create an OAuth application
- GitHub will ask you for a few details like Homepage URL and Authorization callback URL
- Homepage URL is the
domain(https://...) of our Railway deployment, you can find it on Railway. - Authorization callback URL is always
domain+/api/auth/callback/github(w/o plus, one word)
- Copy the new client and secret ID values
- Head to Railway, and to our Dashboard (Next.js) deployment. And replace the
NEXTAUTH_GITHUB_CLIENT_IDandNEXTAUTH_GITHUB_SECRET_IDwith the new OAuth tokens you generated - Redeploy our dashboard and see if you are able to log in now properly now (check if domain after logging in is indeed our Railway deployment URL)
Metadata
Metadata
Assignees
Labels
🛂 authAuthentication stuff using NextAuthAuthentication stuff using NextAuth