Skip to content
Back

How to Appwrite Google Auth with email checking

  • 0
  • Web
lordrhodes.
25 Aug, 2025, 16:08

So I followed the docs to setup Google Auth in my app. But the trouble is anyone with a google account can sign into my CMS.

How do I implement a check to see if the email is the admin email.

I've tried everything I can think of but I just need a nudge in the right direction

TL;DR
To restrict Google Auth to only the admin email, you can add an email check in your authentication flow. Here's a brief overview: 1. Retrieve the authenticated user's email from Google Auth. 2. Compare the email to the admin email you've set. 3. If they match, proceed with authentication. Otherwise, block access. This way, only the admin can access your CMS using Google Auth.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more