configs/auth-config.yaml and deploy.
The managed auth UI in @edgespark/web reads your applied config and renders the right buttons automatically — no frontend changes are needed when you add a new provider.
The shape of every provider setup
Every OAuth provider follows the same four-step pattern:- Create an OAuth app with the provider and enter the EdgeSpark callback URL.
- Store the client ID as a var:
edgespark var set <PROVIDER>_CLIENT_ID=<value>. - Store the client secret as a secret:
edgespark secret set <PROVIDER>_CLIENT_SECRET. - Enable the provider in
configs/auth-config.yaml, runedgespark auth apply, thenedgespark deploy.
Callback URL
When you create the OAuth app with the provider, set the authorization callback (redirect) URL to:<your-domain>is your deployed project URL, for examplemy-app.edgespark.app, or your custom domain.<provider>is one of:google,github,gitlab,discord.
Fixed var and secret names
Key names are fixed per provider — you cannot choose arbitrary names. The platform reads the values through these exact keys.
If your own server code also needs to read these values — for example, to call the provider’s API directly — declare the keys in
server/src/defs/runtime.ts. That step is optional for the auth flow itself, which is fully handled by the platform.
- Open the Google Cloud Console and select or create a project.
- Go to APIs & Services → Credentials and click Create credentials → OAuth client ID.
- Configure the OAuth consent screen if prompted (External user type is typical for consumer apps).
- Choose Web application as the application type and give it a name.
- Under Authorized JavaScript origins, add your deployed project URL:
For example,
https://my-app.edgespark.app. - Under Authorized redirect URIs, add:
- Copy the Client ID and Client secret from the credential details page.
- Store them with the CLI:
- Enable the provider in
configs/auth-config.yaml:configs/auth-config.yaml - Apply and deploy:
GitHub
- Open GitHub Settings → Developer settings → OAuth Apps (either on your user account or organization) and click New OAuth App.
- Set Homepage URL to your deployed project URL, for example
https://my-app.edgespark.app. - Set Authorization callback URL to:
- After creating the app, copy the Client ID and click Generate a new client secret. Copy the secret value immediately — GitHub shows it only once.
- Store them with the CLI:
- Enable the provider in
configs/auth-config.yaml:configs/auth-config.yaml - Apply and deploy:
GitLab
- In GitLab, open User Settings → Applications for a personal app, or Admin → Applications for an instance-wide app.
- Give the application a name and add the Redirect URI:
- Select at least the
read_userandopenidscopes (plusemailandprofileif you want the user’s email and name). - Save the application, then copy the Application ID (this is the client ID) and Secret.
- Store them with the CLI:
- Enable the provider in
configs/auth-config.yaml:configs/auth-config.yaml - Apply and deploy:
Discord
- Open the Discord Developer Portal and click New Application.
- In the application, open OAuth2 → General.
- Under Redirects, add:
- Copy the Client ID, then click Reset Secret to generate a Client Secret.
- Store them with the CLI:
- Enable the provider in
configs/auth-config.yaml:configs/auth-config.yaml - Apply and deploy:
Use enabled providers in the UI
The managed auth UI picks up every enabled provider automatically:web/src/pages/LoginPage.tsx
client.auth.signIn.social:
web/src/lib/auth.ts
provider accepts any of "google", "github", "gitlab", or "discord" — use the same string as in the callback URL.
Full example: enabling multiple providers
configs/auth-config.yaml
Troubleshooting
For platform-wide naming and quota limits, see platform limits.
See also
Manage auth configuration
Full
configs/auth-config.yaml reference, including sessions and email/password.Build auth UI
Mount the managed auth UI or call headless auth methods from the browser.