ESC
NextStarterAI logo
Menu
On this page

Features > Google OAuth

Setup


1. Create a new project on Google Cloud


2. Click on [API & Services] and then [Credentials]


3. Go to [Configure Consent Screen]


4. Provide your information. Utilize the ChatGPT prompts on the /tos and /privacy-policy pages to automatically generate your details. Then add userinfo.email & userinfo.profile to scope.

Add yourself as test user and submit.


5. Navigate to Credentials and select [+ Create Credentials], then choose [Oauth Client ID].


6. Choose [Web Application]. Add http://localhost:3000 and https://your-project.supabase.co Authorized Saved origins. To Authorized Redirect URLs, add https://your-project.supabase.co/auth/v1/callback and click [Create]


7. Copy and paste the Client ID and Client Secret in the Google Secret to your Supabase Project. (Authentication > Providers > Google)


8. In Supabase dashboard, proceed to [Authentication] > [URL Configuration] and then add http://localhost:3000 to [Site URL] section. After that, add http://localhost:3000/* to [Redirect URLs] section.


9. Navigate to the [Oauth Consent Screen] and click on [Publish App]. After that, submit for verification by clicking on [Prepare for verification].


Tips

Google will send you an email, and you need to respond to kickstart the process. Make sure your domain is verified with Google Search Console; you can handle that step now. Logging in with Google already works on localhost. On production, it will function as well but display a warning until you're verified, which typically takes a few days.

Ready for production?

In the Supabase dashboard, navigate to [Authentication], then [URL Configuration]. Insert https://your-domain.com into [Site URL]. Also, include https://your-domain.com/* in [Redirect URLs].