Reputation: 1311
I had the issue to restrict users within the organization using Oauth 2.0 API.
Upvotes: 0
Views: 2623
Reputation: 1311
I resolved it by selecting application type to internal
.
Now, if the users will try to authenticate the user from the email other than organization email. He will get an error message: This client is restricted to users within organization
Notes: The Google developer account should be of the same organization, to which you want to restrict the user oauth
For detail steps you can see the following attached screenshot.
Adding Intenal domain setting screenshot
Google message will be shown to other users screenshot
Upvotes: 4