-
Notifications
You must be signed in to change notification settings - Fork 384
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
fix: apply mailer autoconfirm config to update user email #1646
Conversation
Pull Request Test Coverage Report for Build 9783906918Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Looks like we added a new if branch / clause to handle the autoconfirm case and we only do verification checks on the /verify
route for email change when there's mailer autoconfirm enabled.
LGTM
@J0 thanks for reviewing, will add some tests before merging |
Pull Request Test Coverage Report for Build 9800151798Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
🤖 I have created a release *beep* *boop* --- ## [2.155.1](v2.155.0...v2.155.1) (2024-07-04) ### Bug Fixes * apply mailer autoconfirm config to update user email ([#1646](#1646)) ([a518505](a518505)) * check for empty aud string ([#1649](#1649)) ([42c1d45](42c1d45)) * return proper error if sms rate limit is exceeded ([#1647](#1647)) ([3c8d765](3c8d765)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Hey @kangmingtay! This change had some unexpected effects for us (we have enabled Would it be possible to either tweak this behavior? A possible change is to autoconfirm on update of user email if there is no existing email address (which handles #1619), but require confirmation if there is an existing email address. Otherwise, can we add a new configuration option to restore the original behavior? |
Thanks for the fast response @kangmingtay! 🔥 |
) ## What kind of change does this PR introduce? * `GOTRUE_MAILER_AUTOCONFIRM` setting should be respected in the update email flow via `PUT /user` ## What is the current behavior? * When `GOTRUE_MAILER_AUTOCONFIRM=true`, updating a user's email still sends an email and requires user confirmation * Difficult for anonymous users to upgrade to a permanent user seamlessly without requiring email confirmation * Fixes supabase#1619 ## What is the new behavior? * When `GOTRUE_MAILER_AUTOCONFIRM=true`, updating a user's email will not require email confirmation. ## Additional context Add any other context or screenshots.
🤖 I have created a release *beep* *boop* --- ## [2.155.1](supabase/auth@v2.155.0...v2.155.1) (2024-07-04) ### Bug Fixes * apply mailer autoconfirm config to update user email ([supabase#1646](supabase#1646)) ([a518505](supabase@a518505)) * check for empty aud string ([supabase#1649](supabase#1649)) ([42c1d45](supabase@42c1d45)) * return proper error if sms rate limit is exceeded ([supabase#1647](supabase#1647)) ([3c8d765](supabase@3c8d765)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
) ## What kind of change does this PR introduce? * `GOTRUE_MAILER_AUTOCONFIRM` setting should be respected in the update email flow via `PUT /user` ## What is the current behavior? * When `GOTRUE_MAILER_AUTOCONFIRM=true`, updating a user's email still sends an email and requires user confirmation * Difficult for anonymous users to upgrade to a permanent user seamlessly without requiring email confirmation * Fixes supabase#1619 ## What is the new behavior? * When `GOTRUE_MAILER_AUTOCONFIRM=true`, updating a user's email will not require email confirmation. ## Additional context Add any other context or screenshots.
🤖 I have created a release *beep* *boop* --- ## [2.155.1](supabase/auth@v2.155.0...v2.155.1) (2024-07-04) ### Bug Fixes * apply mailer autoconfirm config to update user email ([supabase#1646](supabase#1646)) ([a518505](supabase@a518505)) * check for empty aud string ([supabase#1649](supabase#1649)) ([42c1d45](supabase@42c1d45)) * return proper error if sms rate limit is exceeded ([supabase#1647](supabase#1647)) ([3c8d765](supabase@3c8d765)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
) ## What kind of change does this PR introduce? * `GOTRUE_MAILER_AUTOCONFIRM` setting should be respected in the update email flow via `PUT /user` ## What is the current behavior? * When `GOTRUE_MAILER_AUTOCONFIRM=true`, updating a user's email still sends an email and requires user confirmation * Difficult for anonymous users to upgrade to a permanent user seamlessly without requiring email confirmation * Fixes supabase#1619 ## What is the new behavior? * When `GOTRUE_MAILER_AUTOCONFIRM=true`, updating a user's email will not require email confirmation. ## Additional context Add any other context or screenshots.
🤖 I have created a release *beep* *boop* --- ## [2.155.1](supabase/auth@v2.155.0...v2.155.1) (2024-07-04) ### Bug Fixes * apply mailer autoconfirm config to update user email ([supabase#1646](supabase#1646)) ([a518505](supabase@a518505)) * check for empty aud string ([supabase#1649](supabase#1649)) ([42c1d45](supabase@42c1d45)) * return proper error if sms rate limit is exceeded ([supabase#1647](supabase#1647)) ([3c8d765](supabase@3c8d765)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
What kind of change does this PR introduce?
GOTRUE_MAILER_AUTOCONFIRM
setting should be respected in the update email flow viaPUT /user
What is the current behavior?
GOTRUE_MAILER_AUTOCONFIRM=true
, updating a user's email still sends an email and requires user confirmationWhat is the new behavior?
GOTRUE_MAILER_AUTOCONFIRM=true
, updating a user's email will not require email confirmation.Additional context
Add any other context or screenshots.