This guide will walk you through setting up Google authentication for the Anchored web application.
anchored.site
openid
(add manually).../auth/userinfo.email
(should be added by default).../auth/userinfo.profile
(should be added by default)Configure the client:
Name: Anchored Web App
Authorized JavaScript origins:
https://anchored.site
http://localhost:3000
(for development)http://localhost:8080
(for development)http://127.0.0.1:3000
(for development)Authorized redirect URIs:
https://kqjcorjjvunmyrnzvqgr.supabase.co/auth/v1/callback
http://localhost:54321/auth/v1/callback
(for local Supabase development)https://anchored.site/
https://anchored.site/dashboard
https://anchored.site/account
http://localhost:3000/
(for development)Replace the placeholder Google Client ID in config.js
:
// Google OAuth configuration
google: {
// Production Google OAuth Client ID (replace with your actual Client ID)
clientId: 'YOUR_ACTUAL_CLIENT_ID_HERE.apps.googleusercontent.com',
// Development/localhost client ID (use same or create separate one)
devClientId: 'YOUR_ACTUAL_CLIENT_ID_HERE.apps.googleusercontent.com'
},
Replace YOUR_ACTUAL_CLIENT_ID_HERE
with the actual Client ID from Step 1.5
For additional security, you can use environment variables:
// In config.js, you could modify to use environment variables:
google: {
clientId: process.env.GOOGLE_CLIENT_ID || 'YOUR_FALLBACK_CLIENT_ID',
devClientId: process.env.GOOGLE_DEV_CLIENT_ID || 'YOUR_FALLBACK_CLIENT_ID'
},
anchored.site
_layouts/default.html
If you encounter issues: