Google Login Configuration
This guide explains how to enable Google login in BBS-GO (including sign-in and account binding).
1. Prerequisites
- Your site is reachable via public domain (production)
- BBS-GO is installed and admin panel is accessible
- A Google Cloud project is available
2. Create OAuth Credentials in Google Cloud Console
- Open Google Cloud Console: https://console.cloud.google.com
- Go to
APIs & Services->Credentials - Click
Create Credentials->OAuth client ID - Select application type
Web application - Configure origins and redirect URIs
2.1 Authorized JavaScript origins
Add your site origins (examples):
https://bbs.example.com- For local development:
http://localhost:8082
2.2 Authorized redirect URIs
You must add both callback URIs (replace with your domain):
https://bbs.example.com/user/signin/callback/googlehttps://bbs.example.com/user/signin/callback/google_bind
Local examples:
http://localhost:8082/user/signin/callback/googlehttp://localhost:8082/user/signin/callback/google_bind
After creation, copy:
Client IDClient Secret
3. Configure in BBS-GO Admin
Open admin panel: System Settings -> Login Settings -> Google Login
Fill and save:
Enable: ONClient ID: from Google Cloud ConsoleClient Secret: from Google Cloud Console
4. Important Setting (BaseURL)
BBS-GO builds Google callback URLs using server config baseURL (shown as BaseURL in some sample files).
Make sure bbs-go.yaml uses your full site URL, for example:
yaml
baseURL: https://bbs.example.comIf it remains /, callback URL may be non-absolute and Google login can fail.
5. Verification
- Open sign-in page:
/user/signin - Confirm Google login button is visible
- Click it and verify redirect to Google authorization page
- After consent, user should return and sign in successfully
Bind-flow verification:
- Sign in and open account binding page
- Start Google binding
- After consent, account should show as bound
6. Common Issues
redirect_uri_mismatch
Cause: Callback URI in Google Console does not match actual callback URI.
Fix:
- Verify
Authorized redirect URIs - Verify
baseURLinbbs-go.yaml - Check scheme/port consistency (
httpvshttps, custom port)
"Google login is not enabled"
Cause: Google login switch is disabled in admin settings.
Fix:
- Enable
Google LogininSystem Settings -> Login Settings - Ensure
Client IDandClient Secretare saved
Works locally but fails in production
Usually domain/protocol/port mismatch.
Fix:
- Add production domain to
Authorized JavaScript origins - Add production callback URIs to
Authorized redirect URIs - Ensure
baseURLmatches production domain exactly


