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
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_ID and NEXTAUTH_GITHUB_SECRET_ID with 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)
The text was updated successfully, but these errors were encountered:
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
domain
(https://...
) of our Railway deployment, you can find it on Railway.domain
+/api/auth/callback/github
(w/o plus, one word)NEXTAUTH_GITHUB_CLIENT_ID
andNEXTAUTH_GITHUB_SECRET_ID
with the new OAuth tokens you generatedThe text was updated successfully, but these errors were encountered: