# Invite user to application and allow login using social google-oauth2

**URL:** <https://community.auth0.com/t/invite-user-to-application-and-allow-login-using-social-google-oauth2/61631>\
**Category:** Get Help\
**Tags:** social, google\
**Created:** [April 23, 2021, 5:52am UTC](https://community.auth0.com/t/invite-user-to-application-and-allow-login-using-social-google-oauth2/61631 "2021-04-23T05:52:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yakir](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yakir/32/26807_2.png) [@yakir](https://community.auth0.com/u/yakir)\
**Post date:** [April 23, 2021, 5:52am UTC](https://community.auth0.com/t/invite-user-to-application-and-allow-login-using-social-google-oauth2/61631/1 "2021-04-23T05:52:21Z")

</div>

I want to allow users to login to my app using google-oauth2, but not allow any signups.

So I’m using the custom rule “Disable social signups” to prevent signing up using google.  
But now I do I actually register new users? I want to be able to say - “here, create this user [bla@gmail.com](mailto:bla@gmail.com) and allow it to login using his gmail account”

---

<div class="post-metadata">

**Author:** ![john.gateley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/john.gateley/32/10879_2.png) [@john.gateley](https://community.auth0.com/u/john.gateley)\
**Post date:** [April 23, 2021, 1:38pm UTC](https://community.auth0.com/t/invite-user-to-application-and-allow-login-using-social-google-oauth2/61631/2 "2021-04-23T13:38:57Z")

</div>

Hi @yakir

I think that rule was designed to disable future social signups but allow existing social users to continue to log in.

To do what you need is a little more challenging. What you need is a rule that checks a database/API to see if a social user has been invited, and fail the login if they have not. You can use an Auth0 username/password database for this, just make sure all applications do not use this as a connection (no logins actually come from this DB, it is just used to verify social logins). Then “invite” means adding that user’s email to this DB. The rule then checks to see if a user exists before allowing the signing.

John

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [April 29, 2021, 12:56pm UTC](https://community.auth0.com/t/invite-user-to-application-and-allow-login-using-social-google-oauth2/61631/3 "2021-04-29T12:56:53Z")

</div>


