Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Can OAuth via Google be limited to a Domain?

Started by Muut Archive 10 years ago · 6 replies · 500 views
10 years ago

I am considering using Grav for a company intranet. We currently use Google Apps for everything, and so I am really excited that Grav supports "Sign in with Google". However, I would need to be able to configure it to only allow users to authenticate that had an email address belonging to our email domain.

I haven't looked into the plugin code yet, but the docs didn't mention this as a feature. I'm sure I could do it with some creative PHP, but i'd rather not mess around with it if there is a built in way, or a better way. Anyone have any input?

Thanks!

-Josh-

10 years ago

Right now the oauth capability is coded into the login plugin but we are discussing breaking this out into a plugin that enhances login. This would also mean you could more easily fork or create your own authentication plugin.

10 years ago

Thanks for the reply. I'll stay tuned. In the meantime I may build something that can intercept a login request, and just do email domain validation in php before submitting to google.

10 years ago

Joshua, did you happen to develop your own solution for this? I'm also looking for Google Authentication with domain filtering.

Thanks!

9 years ago

Hi, correct me if I'm wrong: the recently added whitelisting option effectively allows to restrict access to a specific domain?

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1329 9 years ago
Archive · by Muut Archive, 9 years ago
2 922 9 years ago
Archive · by Muut Archive, 9 years ago
2 4051 9 years ago
Archive · by Muut Archive, 9 years ago
1 2930 9 years ago
Archive · by Muut Archive, 9 years ago
3 1108 9 years ago