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

Simple Email Authorization #801

Merged
merged 6 commits into from
Feb 14, 2024
Merged

Conversation

nicomt
Copy link
Contributor

@nicomt nicomt commented Feb 8, 2024

This PR adds simple email authorization using a new variable ALLOWED_USER_EMAILS in env.local.
This variable should not have any effect if it's undefined or an empty array.
See #795 for more details.

Copy link
Collaborator

@nsarrazin nsarrazin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good at the code level! Left some minor comments and will test it a bit later to make sure the functionality is working 😁

src/routes/login/callback/+page.server.ts Outdated Show resolved Hide resolved
src/routes/login/callback/+page.server.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@nsarrazin nsarrazin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey thanks for the contrib, and sorry for the delay in merging this!

@nsarrazin nsarrazin merged commit 7b7114b into huggingface:main Feb 14, 2024
3 checks passed
@nicomt nicomt deleted the email_authorization branch February 15, 2024 02:37
ice91 pushed a commit to ice91/chat-ui that referenced this pull request Oct 30, 2024
* Add ALLOWED_USER_EMAILS validation in login callback

* Update src/routes/login/callback/+page.server.ts

Adding email validation

Co-authored-by: Nathan Sarrazin <[email protected]>

* Update src/routes/login/callback/+page.server.ts

More detailed error when missing email

Co-authored-by: Nathan Sarrazin <[email protected]>

---------

Co-authored-by: Nathan Sarrazin <[email protected]>
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.

2 participants