infra(railway): federate api login to github oauth via better-auth - #66
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review. WalkthroughRailway Terraform configuration now declares sensitive GitHub OAuth credentials and documents their callback URL. It generates a 40-character password without special characters for JWT signing. The API environment uses a configured API domain or Railway’s public domain, plus derived CORS and Better Auth URLs, GitHub credentials, and the generated secret. Merge Risk: ⚪ Minimal · up to This PR adds GitHub OAuth and JWT signing configuration without any identified merge-blocking risk. It is merge-ready after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Pull request overview
This PR updates the Railway Terraform configuration to support federated login via GitHub OAuth for the API service by wiring OAuth client credentials and generating a Better Auth JWT signing secret.
Changes:
- Add a new
githubinput variable (client ID/secret) and document it interraform.tfvars.example. - Inject GitHub OAuth and Better Auth configuration into the API service environment variables.
- Add a
random_passwordresource to generate the Better Auth signing secret.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| infra/railway/variables.tf | Adds a new github object variable for OAuth credentials. |
| infra/railway/terraform.tfvars.example | Documents how to provide GitHub OAuth credentials in tfvars. |
| infra/railway/locals.tf | Adds OAuth + Better Auth env vars to local.api_env. |
| infra/railway/auth.tf | Generates a random secret for Better Auth JWT signing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ars in auth secret
Code Review ✅ Approved 1 resolved / 1 findingsConfigures GitHub OAuth environment variables and generates a signing secret for better-auth on the API service, addressing the special characters issue in the auth secret. No issues found. ✅ 1 resolved✅ Edge Case: better_auth password uses default special chars unlike postgres
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
What
Adds GitHub OAuth env vars to the api service and generates a random secret for signing better-auth JWTs.
Why
The api needs to authenticate users through GitHub instead of its own credential store.
How to verify