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

🛂 feat(oauth): add domain restriction on social login #2512

Merged

Conversation

mbreton
Copy link
Contributor

@mbreton mbreton commented Apr 24, 2024

Pull Request Template

⚠️ Before Submitting a PR, read the Contributing Docs in full!

Summary

This feature aims to add the domain validation in the social login process. So far, the domain validation was only used during the login/password registration process.

Change Type

Please delete any irrelevant options.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Testing

Add a domain in the config file under the key registration.allowedDomains and try to social log in with a domain name not allowed.

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • New documents have been locally validated with mkdocs

@badcom
Copy link
Sponsor Contributor

badcom commented Apr 24, 2024

There's an open PR for this #1734

@danny-avila
Copy link
Owner

There's an open PR for this #1734

this approach is a lot cleaner as middleware, good thinking @mbreton

@berry-13 do you mind adding your tests and moving isDomainAllowed after I merge this?

@danny-avila danny-avila changed the title feat(oauth): add domain restriction on social login 🛂 feat(oauth): add domain restriction on social login Apr 24, 2024
@danny-avila danny-avila merged commit 75da75b into danny-avila:main Apr 24, 2024
1 check passed
@berry-13
Copy link
Collaborator

There's an open PR for this #1734

this approach is a lot cleaner as middleware, good thinking @mbreton

@berry-13 do you mind adding your tests and moving isDomainAllowed after I merge this?

sure

@mbreton
Copy link
Contributor Author

mbreton commented Apr 24, 2024

You're efficient ❤️

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

Successfully merging this pull request may close these issues.

4 participants