Google Sign-In
1. Google Cloud
- Go to Google Cloud Console → Credentials → Create OAuth client ID → Web application.
- Authorized JavaScript origins: your site URL (and
http://localhost:3000for dev). - Copy the Client ID (ends with
.apps.googleusercontent.com).
2. ClickBase console
Authentication → Sign-in methods → enable Google Sign-In and paste the Client ID.
3. One-line button
<div id="gbtn"></div>
<script>
app.auth.renderGoogleButton("#gbtn", { clientId: "YOUR_CLIENT_ID.apps.googleusercontent.com", theme: "outline", size: "large" })
.then(user => console.log("signed in", user.email));
</script>The helper loads Google Identity Services, renders the official button, and calls auth.signInWithGoogle(idToken). ClickBase verifies the ID token with Google, creates the user on first login (provider google, email verified) and returns normal ClickBase tokens.
Manual flow
// if you render your own Google button / use One Tap
google.accounts.id.initialize({ client_id: CLIENT_ID, callback: r => app.auth.signInWithGoogle(r.credential) });
google.accounts.id.prompt();Was this page helpful? Tell us. · Download SDK