Setting up social sign-in

Pick your provider to get a step-by-step guide for registering your app and pasting its Client ID and Client Secret into DontCode.

~10 minutes per provider
Setup guide

Pick a provider

Each provider has its own developer console, terminology, and approval flow. Open the guide for the one you want to set up. They are independent, you can do one and skip the other.

What you will do

You will create a developer project on each OAuth provider you want to support, configure a redirect URL, copy the Client ID and Client Secret, and paste both into Users, Sign-in settings in your DontCode project. Saving rebuilds your app, and the social sign-in buttons on your live site start working once that finishes.

Before you begin

  • Your DontCode project must be deployed (or have a target deploy URL ready).
  • You need a developer-facing account for each provider you intend to enable.
  • You have admin or owner role on your DontCode project.
  • Adding a sign-in provider depends on your plan. The pricing page shows which plans include it.

Your redirect URL

Every provider asks you for a "Redirect URI" or "Callback URL". This is the address the provider sends users back to after they approve sign-in. For DontCode apps, the pattern is the same regardless of provider:

https://<your-deployed-domain>/api/auth/oauth/callback

Replace <your-deployed-domain> with your primary domain. Your app always sends people back to its primary domain, so that is the one the provider must have. Users, Sign-in settings lists the exact redirect URL for each of your domains, with the primary one marked. Most providers let you register several, so adding the others too keeps sign-in working if you change your primary domain later.

How OAuth works (in 30 seconds)

  1. A user clicks "Sign in with X" on your deployed app.
  2. Your app redirects them to the provider, including your Client ID.
  3. The user approves the sign-in on the provider's page.
  4. The provider redirects them back to your app with a one-time code.
  5. Your app exchanges that code for the user's identity (email, name, etc.) and creates a session.

Troubleshooting (applies to all providers)

Users see "redirect_uri_mismatch"

The redirect URL registered with the provider does not match the one your deployed app actually uses. Double-check spelling, http vs https, and trailing slashes. Most providers let you register multiple redirect URIs. Add every variant you might use (custom domain + dontcode.cafe subdomain).

Login button does not appear after saving

Saving rebuilds your app on its own, with nothing for you to press. The button appears once that rebuild finishes and the new version of your app is live.

Saving says "Could not connect"

Try Save again in a moment. A secret you saved before stays saved, so you paste it again only to replace it. Adding a sign-in provider also depends on your plan; the pricing page shows which plans include it.

Related: how we secure user passwords

OAuth handles sign-in for users who pick a social provider. For users who sign up with email and password, we run their credentials through Argon2id, salt every hash, and isolate each project's auth pool. Worth sending to anyone who asks how your app stores passwords.

Read the security guide →