Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use social auth google settings to restrict domain instead of custom code. #15

Closed
gkapoor121212 opened this issue Dec 27, 2021 · 6 comments

Comments

@gkapoor121212
Copy link
Contributor

Currently, the users which login into system require an Axelerant Gmail ID and this condition has been added via the custom code in the ct_users module. We can remove the custom code and use configurations provided by the Social auth google module or google developer app settings.

@hussainweb
Copy link
Member

Last I checked, Social Auth Google didn't have such options. We considered writing a module but it seemed too trivial and I just wrote the custom code. It's worth reconsidering all the options again.

@hussainweb
Copy link
Member

We can't remove the code in ct_user yet as it is responsible for activating the user. Social Auth module has no feature to enable users created through Social Auth flow. It follows the Drupal configuration for new accounts and we can't remove admin verification for that as /user/register callback is still enabled.

@gkapoor121212
Copy link
Contributor Author

@hussainweb This is the line of code that I thought should be changed if (preg_match('/.*@axelerant\\.com$/i', $user_email) > 0) { as it is restricting login to only users with Axelerant ID. If that's not the case we can keep this issue closed.

@hussainweb
Copy link
Member

Ah, your point is to make this generic and usable by orgs other than Axelerant?

@gkapoor121212
Copy link
Contributor Author

@hussainweb Yes.

@hussainweb
Copy link
Member

Understood, @gkapoor121212. I created #33 to handle this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants