Sign in with Railway
People can now link their Railway account on Linked accounts and sign in to Apiome with it from then on.
- For administrators. Railway is a new entry in System settings → Add Provider. It
needs the client ID and client secret of a Web OAuth app created under your Railway
workspace's Settings → Developer — no issuer.
Sign-in providers lists what to set on
Railway's side. The environment variables are
RAILWAY_CLIENT_IDandRAILWAY_CLIENT_SECRET. - Callback URL.
<BETTER_AUTH_URL>/api/auth/oauth2/callback/railway, added as the app's redirect URI. - Scopes. Apiome asks for openid, email and profile only, and uses them to read the name, email address and picture of the person signing in. Apiome reads no workspaces, projects or deployments and keeps no Railway token.
- Link first. Railway does not say whether an email address is verified, so Apiome never uses a Railway address to find or create an account. People sign in another way, link Railway from Linked accounts, and can sign in with Railway after that. Signing up with Railway, or signing in with it before linking, ends with Your sign-in provider could not confirm that your email address is verified… — even when the address matches an existing account. How a provider's email is trusted explains the classes.
- REST API.
GET /v1/admin/auth-providerslistsrailwayas an available provider, andPUT /v1/admin/auth-providers/railwaystores its credentials.
