Restrict google OAuth sign up to a particular domain/user

I have the Google OAuth working, however, I would like to restrict which domains can sign-up/login and if possible which specific users.

At the moment I can do this post-signup/login by checking their email against an approved set of email addresses, but then I would have a ton of invalid users in my users table. Is there a way to do this pre-signup? i.e., before the user is even created.

2 Likes