Skip to content

Updating visuals

If you see any images containing outdated UI, please bear with us.

We are updating all content as quickly as possible to mirror our new UI.

GitHub authentication ​

GitHub authentication lets your users sign in with the GitHub account they already use for developer tools and projects. Once connected, you can offer “Continue with GitHub” in your WeWeb app.

What this integration supports ​

  • Social sign in with GitHub
  • Redirect to different pages for success, error, and first-time users

Setup in the GitHub dashboard ​

  1. Go to your GitHub account settings and open Developer settings.
  2. Open OAuth Apps and click New OAuth App.
  3. Fill in the app details:
    • Homepage URL: your app’s URL (preview or production)
    • Authorization callback URL: the redirect URL GitHub sends users back to after login
  4. For Authorization callback URL, use the WeWeb callback URL: the address of your app followed by /api/auth/callback/github. The table below lists the URLs to add.
  5. Create the app, then copy:
    • Client ID
    • Client Secret

Add one callback URL for each place where users sign in:

Where users sign inCallback URL to add in GitHub
Editorhttps://<your-project>-editor.weweb.io/api/auth/callback/github
Staging apphttps://<your-project>-staging.weweb.io/api/auth/callback/github
Published apphttps://<your-project>-production.weweb.io/api/auth/callback/github
Custom domainhttps://your-domain.com/api/auth/callback/github

Replace <your-project> with your project's WeWeb subdomain. You can see it in your browser's address bar when the editor is open, for example bright-harbor in https://bright-harbor-editor.weweb.io.

CALLBACK URL VS SUCCESS PAGE

GitHub always sends users back to the callback URL, never to a page of your app. WeWeb then completes sign in and takes users to the Success Page, Error Page, or New User Page you choose in the Sign in with social provider action. Do not add the URL of these pages in GitHub.

Connect GitHub in WeWeb ​

  1. In the WeWeb editor, open the Data & API tab, then open the Authentication subtab and go to SSO Providers.
  2. Select GitHub and turn on the Enable toggle.
  3. Paste your credentials into the fields shown in WeWeb:
    • Client ID
    • Client Secret
  4. Click Save.

Test sign in ​

  1. In Interface, add a “Continue with GitHub” button.
  2. Create a workflow on click and add Sign in with social provider.
  3. Set:
    • Provider: github
    • Success Page, Error Page, and (optional) New User Page
  4. Preview your app and complete the GitHub sign-in flow.

To learn how sessions, roles, and protected pages work after sign in, refer to the shared auth docs.

Common pitfalls ​

Redirect URL mismatch ​

If GitHub shows a callback or redirect error:

  • Make sure the Authorization callback URL in GitHub exactly matches the WeWeb callback URL ending with /api/auth/callback/github (no trailing slash), not the Success Page URL you selected in WeWeb.
  • Check you’re using the correct environment (editor, staging app, published app, or custom domain).

App shows “not allowed” or missing permissions ​

If users can’t complete the sign-in flow, confirm you created the correct type of OAuth app and that it’s active in your GitHub settings.

Reference ​

Settings ​

Setting in WeWebDescriptionWhere to find it in GitHub
Client IDIdentifies your GitHub OAuth app.Settings → Developer settings → OAuth Apps.
Client SecretUsed to complete the sign-in flow securely.Same OAuth app page (Generate a new client secret if needed).

FAQs ​

Which callback URL should I add in GitHub?

Add the address of your app followed by /api/auth/callback/github, for example https://your-domain.com/api/auth/callback/github. Add one for each place where users sign in (editor, staging app, published app, custom domain). The URL of your Success Page is not the redirect URL.

Can I use GitHub sign in and email/password together?

Yes. You can enable multiple providers and let users choose how to sign in.