Authorizing Google users for multi-tenant organization


Hi folks,

I have a multi-tenant SaaS application and want to integrate Google authentication via the core package. However, I’m not sure how to setup the workflow so an admin can add a user, who is then required to setup / link their Google account. How can I ensure that only users authorized to access an organization can do so, but they are authenticated through Google?

If you know of any posts or resources for this sort of situation, I’d greatly appreciate it.



You can use Accounts.validateNewUser to validate the incoming user email address against known addresses from your database and accept/reject accordingly.

Here’s the link to the relevant part of the docs: