Skip to main content
EdgeSpark ships with a managed auth service that handles OAuth flows end to end. To turn on a social provider such as Google or GitHub, you register an OAuth app with the provider, store the client ID as a var and the client secret as a secret, then enable the provider in 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:
  1. Create an OAuth app with the provider and enter the EdgeSpark callback URL.
  2. Store the client ID as a var: edgespark var set <PROVIDER>_CLIENT_ID=<value>.
  3. Store the client secret as a secret: edgespark secret set <PROVIDER>_CLIENT_SECRET.
  4. Enable the provider in configs/auth-config.yaml, run edgespark auth apply, then edgespark deploy.
edgespark secret set opens a secure EdgeSpark browser URL for the human owner to paste the secret value. Secret values never pass through terminal output, agent context, or third-party LLM APIs such as Anthropic, Google, or OpenAI.

Callback URL

When you create the OAuth app with the provider, set the authorization callback (redirect) URL to:
Where:
  • <your-domain> is your deployed project URL, for example my-app.edgespark.app, or your custom domain.
  • <provider> is one of: google, github, gitlab, discord.
Most providers let you register several callback URLs, so you can add both your EdgeSpark URL and any custom domain at the same time.

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.

Google

  1. Open the Google Cloud Console and select or create a project.
  2. Go to APIs & Services → Credentials and click Create credentials → OAuth client ID.
  3. Configure the OAuth consent screen if prompted (External user type is typical for consumer apps).
  4. Choose Web application as the application type and give it a name.
  5. Under Authorized JavaScript origins, add your deployed project URL:
    For example, https://my-app.edgespark.app.
  6. Under Authorized redirect URIs, add:
  7. Copy the Client ID and Client secret from the credential details page.
  8. Store them with the CLI:
  9. Enable the provider in configs/auth-config.yaml:
    configs/auth-config.yaml
  10. Apply and deploy:

GitHub

  1. Open GitHub Settings → Developer settings → OAuth Apps (either on your user account or organization) and click New OAuth App.
  2. Set Homepage URL to your deployed project URL, for example https://my-app.edgespark.app.
  3. Set Authorization callback URL to:
  4. 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.
  5. Store them with the CLI:
  6. Enable the provider in configs/auth-config.yaml:
    configs/auth-config.yaml
  7. Apply and deploy:

GitLab

  1. In GitLab, open User Settings → Applications for a personal app, or Admin → Applications for an instance-wide app.
  2. Give the application a name and add the Redirect URI:
  3. Select at least the read_user and openid scopes (plus email and profile if you want the user’s email and name).
  4. Save the application, then copy the Application ID (this is the client ID) and Secret.
  5. Store them with the CLI:
  6. Enable the provider in configs/auth-config.yaml:
    configs/auth-config.yaml
  7. Apply and deploy:

Discord

  1. Open the Discord Developer Portal and click New Application.
  2. In the application, open OAuth2 → General.
  3. Under Redirects, add:
  4. Copy the Client ID, then click Reset Secret to generate a Client Secret.
  5. Store them with the CLI:
  6. Enable the provider in configs/auth-config.yaml:
    configs/auth-config.yaml
  7. Apply and deploy:

Use enabled providers in the UI

The managed auth UI picks up every enabled provider automatically:
web/src/pages/LoginPage.tsx
To trigger a provider from your own button instead of the managed UI, call 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.
Last modified on April 16, 2026