I'm interested in the question: is it possible to configure the Google OAuth application so that the site can only be entered from certain domains (mails)?
Perhaps there is functionality on the Google OAuth side to prohibit login and registration on the site for everyone (White List for authorization) The site is powered by WordPress
I will be glad to any advice and help.
It is necessary to restrict users who can log in via Google on the WordPress site
Example: A WordPress site with authorization via Google, you need to make it possible to skip only those domains (mails) that are added to the list of allowed authorizations, for example - mail@example.com (Business accounts) and reject others - mail@gmail.com
Solved! Go to Solution.
Hi @codenear,
This seems to be not possible as this is not a built-in feature of Google OAuth and needs to be implemented on your WordPress site, but on the other hand, you can configure Google OAuth application to restrict login and registration on your WordPress site to certain domains (emails). This can be a workaround you can try by using the Google OAuth API to authenticate users and add a custom validation step in your WordPress site to check the user's email domain. If the domain is not in the whitelist, you can deny access
You can try these steps below:
Let me know if this works.
Hi @codenear,
This seems to be not possible as this is not a built-in feature of Google OAuth and needs to be implemented on your WordPress site, but on the other hand, you can configure Google OAuth application to restrict login and registration on your WordPress site to certain domains (emails). This can be a workaround you can try by using the Google OAuth API to authenticate users and add a custom validation step in your WordPress site to check the user's email domain. If the domain is not in the whitelist, you can deny access
You can try these steps below:
Let me know if this works.