Appearance
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
- Go to your GitHub account settings and open
Developer settings. - Open
OAuth Appsand clickNew OAuth App. - 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
- 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. - Create the app, then copy:
Client IDClient Secret
Add one callback URL for each place where users sign in:
| Where users sign in | Callback URL to add in GitHub |
|---|---|
| Editor | https://<your-project>-editor.weweb.io/api/auth/callback/github |
| Staging app | https://<your-project>-staging.weweb.io/api/auth/callback/github |
| Published app | https://<your-project>-production.weweb.io/api/auth/callback/github |
| Custom domain | https://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
- In the WeWeb editor, open the
Data & APItab, then open theAuthenticationsubtab and go toSSO Providers. - Select
GitHuband turn on theEnabletoggle. - Paste your credentials into the fields shown in WeWeb:
Client IDClient Secret
- Click
Save.
Test sign in
- In
Interface, add a “Continue with GitHub” button. - Create a workflow on click and add
Sign in with social provider. - Set:
Provider:githubSuccess Page,Error Page, and (optional)New User Page
- 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 URLin GitHub exactly matches the WeWeb callback URL ending with/api/auth/callback/github(no trailing slash), not theSuccess PageURL 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 WeWeb | Description | Where to find it in GitHub |
|---|---|---|
Client ID | Identifies your GitHub OAuth app. | Settings → Developer settings → OAuth Apps. |
Client Secret | Used 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.

