File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Signs the JWTs.
2+ resource "random_password" "better_auth" {
3+ length = 40
4+ }
Original file line number Diff line number Diff line change @@ -10,12 +10,16 @@ locals {
1010 }
1111
1212 api_env = {
13- PORT = tostring (var. api . port )
14- METRICS_PORT = " 9090"
15- LOG_LEVEL = " info"
16- OTEL_ENABLED = " false"
17- CORS_ORIGINS = " https://$${{RAILWAY_PUBLIC_DOMAIN}}"
18- DATABASE_URL = " $${{Postgres.DATABASE_URL}}"
13+ PORT = tostring (var. api . port )
14+ METRICS_PORT = " 9090"
15+ LOG_LEVEL = " info"
16+ OTEL_ENABLED = " false"
17+ CORS_ORIGINS = " https://$${{RAILWAY_PUBLIC_DOMAIN}}"
18+ DATABASE_URL = " $${{Postgres.DATABASE_URL}}"
19+ GITHUB_CLIENT_ID = var.github.client_id
20+ GITHUB_CLIENT_SECRET = var.github.client_secret
21+ BETTER_AUTH_URL = " https://$${{RAILWAY_PUBLIC_DOMAIN}}"
22+ BETTER_AUTH_SECRET = random_password.better_auth.result
1923 }
2024
2125 # service name -> its SQL dir. Add a line to onboard another service.
Original file line number Diff line number Diff line change @@ -12,3 +12,9 @@ api = {
1212 port = 3002
1313 domain = null # or "api.example.com"
1414}
15+
16+ # From the GitHub OAuth app. Callback: https://<domain>/api/auth/callback/github
17+ github = {
18+ client_id = ""
19+ client_secret = ""
20+ }
Original file line number Diff line number Diff line change @@ -18,3 +18,12 @@ variable "api" {
1818 domain = string # null for the free *.up.railway.app URL
1919 })
2020}
21+
22+ # The GitHub OAuth app thoth federates login to.
23+ variable "github" {
24+ type = object ({
25+ client_id = string
26+ client_secret = string
27+ })
28+ sensitive = true
29+ }
You can’t perform that action at this time.
0 commit comments