Skip to content

Create GitHub OAuth keys for our Railway deployment #110

@aryanprince

Description

@aryanprince

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

  1. 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)
  2. Copy the new client and secret ID values
  3. 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
  4. 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 NextAuth

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions