-
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: update mfa phone migration to be idempotent #1687
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pull Request Test Coverage Report for Build 10163294486Warning: 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 |
kangmingtay
reviewed
Jul 30, 2024
hf
approved these changes
Jul 31, 2024
J0
pushed a commit
that referenced
this pull request
Jul 31, 2024
🤖 I have created a release *beep* *boop* --- ## [2.158.0](v2.157.0...v2.158.0) (2024-07-31) ### Features * add hook log entry with `run_hook` action ([#1684](#1684)) ([46491b8](46491b8)) * MFA (Phone) ([#1668](#1668)) ([ae091aa](ae091aa)) ### Bug Fixes * maintain backward compatibility for asymmetric JWTs ([#1690](#1690)) ([0ad1402](0ad1402)) * MFA NewFactor to default to creating unverfied factors ([#1692](#1692)) ([3d448fa](3d448fa)) * minor spelling errors ([#1688](#1688)) ([6aca52b](6aca52b)), closes [#1682](#1682) * treat `GOTRUE_MFA_ENABLED` as meaning TOTP enabled on enroll and verify ([#1694](#1694)) ([8015251](8015251)) * update mfa phone migration to be idempotent ([#1687](#1687)) ([fdff1e7](fdff1e7)) --- 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>
J0
added a commit
that referenced
this pull request
Aug 5, 2024
## What kind of change does this PR introduce? With this change: - Multiple verified phone mfa factors can exist so long as they have distinct phone numbers (see discussion below) - Enrolling a factor with a number that is the same as the existing verified factor will result in a 422 status code - Enrolling a factor with a number that is the same as another existing unverified factor will result in the deletion of the older factor. Also includes: - A refactor to check for duplicate constraints at application level then at the Postgres layer. - A narrowing of deletion so that only unverified factors of the same type are deleted upon first successful verification Follow up to #1687 to support the unique constraint on phone factors.
uxodb
pushed a commit
to uxodb/auth
that referenced
this pull request
Nov 13, 2024
## What kind of change does this PR introduce? - Add `if not exists` so the migration is idempotent - Also drops the partial unique constraint on phone factors to avoid potential database bloat
uxodb
pushed a commit
to uxodb/auth
that referenced
this pull request
Nov 13, 2024
🤖 I have created a release *beep* *boop* --- ## [2.158.0](supabase/auth@v2.157.0...v2.158.0) (2024-07-31) ### Features * add hook log entry with `run_hook` action ([supabase#1684](supabase#1684)) ([46491b8](supabase@46491b8)) * MFA (Phone) ([supabase#1668](supabase#1668)) ([ae091aa](supabase@ae091aa)) ### Bug Fixes * maintain backward compatibility for asymmetric JWTs ([supabase#1690](supabase#1690)) ([0ad1402](supabase@0ad1402)) * MFA NewFactor to default to creating unverfied factors ([supabase#1692](supabase#1692)) ([3d448fa](supabase@3d448fa)) * minor spelling errors ([supabase#1688](supabase#1688)) ([6aca52b](supabase@6aca52b)), closes [supabase#1682](supabase#1682) * treat `GOTRUE_MFA_ENABLED` as meaning TOTP enabled on enroll and verify ([supabase#1694](supabase#1694)) ([8015251](supabase@8015251)) * update mfa phone migration to be idempotent ([supabase#1687](supabase#1687)) ([fdff1e7](supabase@fdff1e7)) --- 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>
uxodb
pushed a commit
to uxodb/auth
that referenced
this pull request
Nov 13, 2024
## What kind of change does this PR introduce? With this change: - Multiple verified phone mfa factors can exist so long as they have distinct phone numbers (see discussion below) - Enrolling a factor with a number that is the same as the existing verified factor will result in a 422 status code - Enrolling a factor with a number that is the same as another existing unverified factor will result in the deletion of the older factor. Also includes: - A refactor to check for duplicate constraints at application level then at the Postgres layer. - A narrowing of deletion so that only unverified factors of the same type are deleted upon first successful verification Follow up to supabase#1687 to support the unique constraint on phone factors.
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 13, 2024
## What kind of change does this PR introduce? - Add `if not exists` so the migration is idempotent - Also drops the partial unique constraint on phone factors to avoid potential database bloat
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 13, 2024
🤖 I have created a release *beep* *boop* --- ## [2.158.0](supabase/auth@v2.157.0...v2.158.0) (2024-07-31) ### Features * add hook log entry with `run_hook` action ([supabase#1684](supabase#1684)) ([46491b8](supabase@46491b8)) * MFA (Phone) ([supabase#1668](supabase#1668)) ([ae091aa](supabase@ae091aa)) ### Bug Fixes * maintain backward compatibility for asymmetric JWTs ([supabase#1690](supabase#1690)) ([0ad1402](supabase@0ad1402)) * MFA NewFactor to default to creating unverfied factors ([supabase#1692](supabase#1692)) ([3d448fa](supabase@3d448fa)) * minor spelling errors ([supabase#1688](supabase#1688)) ([6aca52b](supabase@6aca52b)), closes [supabase#1682](supabase#1682) * treat `GOTRUE_MFA_ENABLED` as meaning TOTP enabled on enroll and verify ([supabase#1694](supabase#1694)) ([8015251](supabase@8015251)) * update mfa phone migration to be idempotent ([supabase#1687](supabase#1687)) ([fdff1e7](supabase@fdff1e7)) --- 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>
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 13, 2024
## What kind of change does this PR introduce? With this change: - Multiple verified phone mfa factors can exist so long as they have distinct phone numbers (see discussion below) - Enrolling a factor with a number that is the same as the existing verified factor will result in a 422 status code - Enrolling a factor with a number that is the same as another existing unverified factor will result in the deletion of the older factor. Also includes: - A refactor to check for duplicate constraints at application level then at the Postgres layer. - A narrowing of deletion so that only unverified factors of the same type are deleted upon first successful verification Follow up to supabase#1687 to support the unique constraint on phone factors.
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 15, 2024
## What kind of change does this PR introduce? - Add `if not exists` so the migration is idempotent - Also drops the partial unique constraint on phone factors to avoid potential database bloat
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 15, 2024
🤖 I have created a release *beep* *boop* --- ## [2.158.0](supabase/auth@v2.157.0...v2.158.0) (2024-07-31) ### Features * add hook log entry with `run_hook` action ([supabase#1684](supabase#1684)) ([46491b8](supabase@46491b8)) * MFA (Phone) ([supabase#1668](supabase#1668)) ([ae091aa](supabase@ae091aa)) ### Bug Fixes * maintain backward compatibility for asymmetric JWTs ([supabase#1690](supabase#1690)) ([0ad1402](supabase@0ad1402)) * MFA NewFactor to default to creating unverfied factors ([supabase#1692](supabase#1692)) ([3d448fa](supabase@3d448fa)) * minor spelling errors ([supabase#1688](supabase#1688)) ([6aca52b](supabase@6aca52b)), closes [supabase#1682](supabase#1682) * treat `GOTRUE_MFA_ENABLED` as meaning TOTP enabled on enroll and verify ([supabase#1694](supabase#1694)) ([8015251](supabase@8015251)) * update mfa phone migration to be idempotent ([supabase#1687](supabase#1687)) ([fdff1e7](supabase@fdff1e7)) --- 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>
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 15, 2024
## What kind of change does this PR introduce? With this change: - Multiple verified phone mfa factors can exist so long as they have distinct phone numbers (see discussion below) - Enrolling a factor with a number that is the same as the existing verified factor will result in a 422 status code - Enrolling a factor with a number that is the same as another existing unverified factor will result in the deletion of the older factor. Also includes: - A refactor to check for duplicate constraints at application level then at the Postgres layer. - A narrowing of deletion so that only unverified factors of the same type are deleted upon first successful verification Follow up to supabase#1687 to support the unique constraint on phone factors.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
if not exists
so the migration is idempotent