Repository navigation
feat: MFA (Phone) - #1668
Merged
Merged
feat: MFA (Phone)#1668
Conversation
Pull Request Test Coverage Report for Build 10150978218Details
💛 - Coveralls |
J0
commented
Jul 19, 2024
J0
commented
Jul 19, 2024
J0
commented
Jul 19, 2024
J0
commented
Jul 22, 2024
hf
reviewed
Jul 22, 2024
hf
reviewed
Jul 22, 2024
staaldraad
reviewed
Jul 24, 2024
staaldraad
reviewed
Jul 24, 2024
hf
reviewed
Jul 24, 2024
Contributor
Author
|
Sorry folks should have followed up yesterday but stuck on debugging one test regression 😅 - there are some unpushed changes which should address most of the changes (with exception of hashing) Push in a bit |
hf
approved these changes
Jul 25, 2024
hf
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me, just please add the encrypted string on the OTP challenge.
J0
marked this pull request as ready for review
July 25, 2024 12:36
Contributor
Author
|
Will do a bunch of prodding with the proposed frontend bindings before proceeding further. |
kangmingtay
reviewed
Jul 26, 2024
J0
commented
Jul 26, 2024
kangmingtay
reviewed
Jul 26, 2024
kangmingtay
reviewed
Jul 26, 2024
kangmingtay
reviewed
Jul 26, 2024
kangmingtay
reviewed
Jul 26, 2024
kangmingtay
reviewed
Jul 26, 2024
kangmingtay
reviewed
Jul 26, 2024
kangmingtay
reviewed
Jul 26, 2024
kangmingtay
reviewed
Jul 26, 2024
hf
reviewed
Jul 26, 2024
hf
reviewed
Jul 26, 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 1, 2024
## What kind of change does this PR introduce? Complement to #1668 Add OpenAPI specification for MFA (Phone). In particular, updates the parameters and `/enroll` `/challenge` and `/verify`
uxodb
pushed a commit
to uxodb/auth
that referenced
this pull request
Nov 13, 2024
## What kind of change does this PR introduce? We introduce MFA (Phone) to allow developers to enroll a Phone-based MFA factor. We maintain the existing pattern of enroll, challenge, verify. The frontend bindings are [listed here](https://github.com/supabase/auth-js/pull/932/files) but as a summary `enroll` - `enroll({factorType: 'phone', phoneNumber:'<e164-phone-number>', friendlyName:'<optional-name>'})` `challenge` - `challenge({channel: '<whatsapp>'})`. If no channel is specified it defaults to `sms`. ### How it works This is and additive change - there should be no impact on the existing flow unless one specifies `{'factor_type': 'phone'}` in the request body. ### Key Details - OTP Expiry is currently tied to challenge expiry. The OTP will last as long as the challenge. We can expose an option to decouple this in the future since it is and additive change. - It is independent of the phone provider. You can use MFA (Phone) even if Phone Provider is disabled. - There is however, links to the phone provider. MFA (Phone) will derive configuration from Phone Provider (e.g. if Phone provider is configured to use Twilio, MFA (Phone) will use Twilio. If you wish to use a separate phone provider please use the Send SMS Hook. - OTP's are stored encrypted in the database. #### Configuration - We have `ENROLL_ENABLED` and `VERIFY_ENABLED` toggles or both TOTP and Phone Factors. #### Integration with Hooks - When used with the MFA Verification Hook the input payload to the hook will contain a factor type indicator: ``` hooks.MFAVerificationAttemptInput { .... FactorType: 'sms' .... } ``` When used with the Send SMS Hook there's an indicator for the SMSType specifying that it is an MFA Hook. Use as needed. ``` hooks.SendSMSInput{ User: user, SMS: hooks.SMS{ ... SMSType: "mfa", }, } ``` #### Security Concerns - Vulnerability to Brute Force Attack / Distributed attack - Leakage of OTP Code anywhere
uxodb
pushed a commit
to uxodb/auth
that referenced
this pull request
Nov 13, 2024
… verify (supabase#1694) `GOTRUE_MFA_ENABLED` used to control whether TOTP enroll and verify were on, but with supabase#1668 this config option was disregarded, meaning that TOTP will stop working for already configured projects.
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? Complement to supabase#1668 Add OpenAPI specification for MFA (Phone). In particular, updates the parameters and `/enroll` `/challenge` and `/verify`
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 13, 2024
## What kind of change does this PR introduce? We introduce MFA (Phone) to allow developers to enroll a Phone-based MFA factor. We maintain the existing pattern of enroll, challenge, verify. The frontend bindings are [listed here](https://github.com/supabase/auth-js/pull/932/files) but as a summary `enroll` - `enroll({factorType: 'phone', phoneNumber:'<e164-phone-number>', friendlyName:'<optional-name>'})` `challenge` - `challenge({channel: '<whatsapp>'})`. If no channel is specified it defaults to `sms`. ### How it works This is and additive change - there should be no impact on the existing flow unless one specifies `{'factor_type': 'phone'}` in the request body. ### Key Details - OTP Expiry is currently tied to challenge expiry. The OTP will last as long as the challenge. We can expose an option to decouple this in the future since it is and additive change. - It is independent of the phone provider. You can use MFA (Phone) even if Phone Provider is disabled. - There is however, links to the phone provider. MFA (Phone) will derive configuration from Phone Provider (e.g. if Phone provider is configured to use Twilio, MFA (Phone) will use Twilio. If you wish to use a separate phone provider please use the Send SMS Hook. - OTP's are stored encrypted in the database. #### Configuration - We have `ENROLL_ENABLED` and `VERIFY_ENABLED` toggles or both TOTP and Phone Factors. #### Integration with Hooks - When used with the MFA Verification Hook the input payload to the hook will contain a factor type indicator: ``` hooks.MFAVerificationAttemptInput { .... FactorType: 'sms' .... } ``` When used with the Send SMS Hook there's an indicator for the SMSType specifying that it is an MFA Hook. Use as needed. ``` hooks.SendSMSInput{ User: user, SMS: hooks.SMS{ ... SMSType: "mfa", }, } ``` #### Security Concerns - Vulnerability to Brute Force Attack / Distributed attack - Leakage of OTP Code anywhere
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 13, 2024
… verify (supabase#1694) `GOTRUE_MFA_ENABLED` used to control whether TOTP enroll and verify were on, but with supabase#1668 this config option was disregarded, meaning that TOTP will stop working for already configured projects.
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? Complement to supabase#1668 Add OpenAPI specification for MFA (Phone). In particular, updates the parameters and `/enroll` `/challenge` and `/verify`
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 15, 2024
## What kind of change does this PR introduce? We introduce MFA (Phone) to allow developers to enroll a Phone-based MFA factor. We maintain the existing pattern of enroll, challenge, verify. The frontend bindings are [listed here](https://github.com/supabase/auth-js/pull/932/files) but as a summary `enroll` - `enroll({factorType: 'phone', phoneNumber:'<e164-phone-number>', friendlyName:'<optional-name>'})` `challenge` - `challenge({channel: '<whatsapp>'})`. If no channel is specified it defaults to `sms`. ### How it works This is and additive change - there should be no impact on the existing flow unless one specifies `{'factor_type': 'phone'}` in the request body. ### Key Details - OTP Expiry is currently tied to challenge expiry. The OTP will last as long as the challenge. We can expose an option to decouple this in the future since it is and additive change. - It is independent of the phone provider. You can use MFA (Phone) even if Phone Provider is disabled. - There is however, links to the phone provider. MFA (Phone) will derive configuration from Phone Provider (e.g. if Phone provider is configured to use Twilio, MFA (Phone) will use Twilio. If you wish to use a separate phone provider please use the Send SMS Hook. - OTP's are stored encrypted in the database. #### Configuration - We have `ENROLL_ENABLED` and `VERIFY_ENABLED` toggles or both TOTP and Phone Factors. #### Integration with Hooks - When used with the MFA Verification Hook the input payload to the hook will contain a factor type indicator: ``` hooks.MFAVerificationAttemptInput { .... FactorType: 'sms' .... } ``` When used with the Send SMS Hook there's an indicator for the SMSType specifying that it is an MFA Hook. Use as needed. ``` hooks.SendSMSInput{ User: user, SMS: hooks.SMS{ ... SMSType: "mfa", }, } ``` #### Security Concerns - Vulnerability to Brute Force Attack / Distributed attack - Leakage of OTP Code anywhere
LashaJini
pushed a commit
to LashaJini/auth
that referenced
this pull request
Nov 15, 2024
… verify (supabase#1694) `GOTRUE_MFA_ENABLED` used to control whether TOTP enroll and verify were on, but with supabase#1668 this config option was disregarded, meaning that TOTP will stop working for already configured projects.
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? Complement to supabase#1668 Add OpenAPI specification for MFA (Phone). In particular, updates the parameters and `/enroll` `/challenge` and `/verify`
cemalkilic
pushed a commit
that referenced
this pull request
Aug 7, 2025
## What kind of change does this PR introduce? We introduce MFA (Phone) to allow developers to enroll a Phone-based MFA factor. We maintain the existing pattern of enroll, challenge, verify. The frontend bindings are [listed here](https://github.com/supabase/auth-js/pull/932/files) but as a summary `enroll` - `enroll({factorType: 'phone', phoneNumber:'<e164-phone-number>', friendlyName:'<optional-name>'})` `challenge` - `challenge({channel: '<whatsapp>'})`. If no channel is specified it defaults to `sms`. ### How it works This is and additive change - there should be no impact on the existing flow unless one specifies `{'factor_type': 'phone'}` in the request body. ### Key Details - OTP Expiry is currently tied to challenge expiry. The OTP will last as long as the challenge. We can expose an option to decouple this in the future since it is and additive change. - It is independent of the phone provider. You can use MFA (Phone) even if Phone Provider is disabled. - There is however, links to the phone provider. MFA (Phone) will derive configuration from Phone Provider (e.g. if Phone provider is configured to use Twilio, MFA (Phone) will use Twilio. If you wish to use a separate phone provider please use the Send SMS Hook. - OTP's are stored encrypted in the database. #### Configuration - We have `ENROLL_ENABLED` and `VERIFY_ENABLED` toggles or both TOTP and Phone Factors. #### Integration with Hooks - When used with the MFA Verification Hook the input payload to the hook will contain a factor type indicator: ``` hooks.MFAVerificationAttemptInput { .... FactorType: 'sms' .... } ``` When used with the Send SMS Hook there's an indicator for the SMSType specifying that it is an MFA Hook. Use as needed. ``` hooks.SendSMSInput{ User: user, SMS: hooks.SMS{ ... SMSType: "mfa", }, } ``` #### Security Concerns - Vulnerability to Brute Force Attack / Distributed attack - Leakage of OTP Code anywhere
cemalkilic
pushed a commit
that referenced
this pull request
Aug 7, 2025
🤖 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>
cemalkilic
pushed a commit
that referenced
this pull request
Aug 7, 2025
## What kind of change does this PR introduce? Complement to #1668 Add OpenAPI specification for MFA (Phone). In particular, updates the parameters and `/enroll` `/challenge` and `/verify`
xeladotbe
pushed a commit
to xeladotbe/supabase-auth
that referenced
this pull request
Sep 27, 2025
## What kind of change does this PR introduce? We introduce MFA (Phone) to allow developers to enroll a Phone-based MFA factor. We maintain the existing pattern of enroll, challenge, verify. The frontend bindings are [listed here](https://github.com/supabase/auth-js/pull/932/files) but as a summary `enroll` - `enroll({factorType: 'phone', phoneNumber:'<e164-phone-number>', friendlyName:'<optional-name>'})` `challenge` - `challenge({channel: '<whatsapp>'})`. If no channel is specified it defaults to `sms`. ### How it works This is and additive change - there should be no impact on the existing flow unless one specifies `{'factor_type': 'phone'}` in the request body. ### Key Details - OTP Expiry is currently tied to challenge expiry. The OTP will last as long as the challenge. We can expose an option to decouple this in the future since it is and additive change. - It is independent of the phone provider. You can use MFA (Phone) even if Phone Provider is disabled. - There is however, links to the phone provider. MFA (Phone) will derive configuration from Phone Provider (e.g. if Phone provider is configured to use Twilio, MFA (Phone) will use Twilio. If you wish to use a separate phone provider please use the Send SMS Hook. - OTP's are stored encrypted in the database. #### Configuration - We have `ENROLL_ENABLED` and `VERIFY_ENABLED` toggles or both TOTP and Phone Factors. #### Integration with Hooks - When used with the MFA Verification Hook the input payload to the hook will contain a factor type indicator: ``` hooks.MFAVerificationAttemptInput { .... FactorType: 'sms' .... } ``` When used with the Send SMS Hook there's an indicator for the SMSType specifying that it is an MFA Hook. Use as needed. ``` hooks.SendSMSInput{ User: user, SMS: hooks.SMS{ ... SMSType: "mfa", }, } ``` #### Security Concerns - Vulnerability to Brute Force Attack / Distributed attack - Leakage of OTP Code anywhere
xeladotbe
pushed a commit
to xeladotbe/supabase-auth
that referenced
this pull request
Sep 27, 2025
… verify (supabase#1694) `GOTRUE_MFA_ENABLED` used to control whether TOTP enroll and verify were on, but with supabase#1668 this config option was disregarded, meaning that TOTP will stop working for already configured projects.
xeladotbe
pushed a commit
to xeladotbe/supabase-auth
that referenced
this pull request
Sep 27, 2025
🤖 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>
xeladotbe
pushed a commit
to xeladotbe/supabase-auth
that referenced
this pull request
Sep 27, 2025
## What kind of change does this PR introduce? Complement to supabase#1668 Add OpenAPI specification for MFA (Phone). In particular, updates the parameters and `/enroll` `/challenge` and `/verify`
fadymak
pushed a commit
that referenced
this pull request
Sep 30, 2025
## What kind of change does this PR introduce? We introduce MFA (Phone) to allow developers to enroll a Phone-based MFA factor. We maintain the existing pattern of enroll, challenge, verify. The frontend bindings are [listed here](https://github.com/supabase/auth-js/pull/932/files) but as a summary `enroll` - `enroll({factorType: 'phone', phoneNumber:'<e164-phone-number>', friendlyName:'<optional-name>'})` `challenge` - `challenge({channel: '<whatsapp>'})`. If no channel is specified it defaults to `sms`. ### How it works This is and additive change - there should be no impact on the existing flow unless one specifies `{'factor_type': 'phone'}` in the request body. ### Key Details - OTP Expiry is currently tied to challenge expiry. The OTP will last as long as the challenge. We can expose an option to decouple this in the future since it is and additive change. - It is independent of the phone provider. You can use MFA (Phone) even if Phone Provider is disabled. - There is however, links to the phone provider. MFA (Phone) will derive configuration from Phone Provider (e.g. if Phone provider is configured to use Twilio, MFA (Phone) will use Twilio. If you wish to use a separate phone provider please use the Send SMS Hook. - OTP's are stored encrypted in the database. #### Configuration - We have `ENROLL_ENABLED` and `VERIFY_ENABLED` toggles or both TOTP and Phone Factors. #### Integration with Hooks - When used with the MFA Verification Hook the input payload to the hook will contain a factor type indicator: ``` hooks.MFAVerificationAttemptInput { .... FactorType: 'sms' .... } ``` When used with the Send SMS Hook there's an indicator for the SMSType specifying that it is an MFA Hook. Use as needed. ``` hooks.SendSMSInput{ User: user, SMS: hooks.SMS{ ... SMSType: "mfa", }, } ``` #### Security Concerns - Vulnerability to Brute Force Attack / Distributed attack - Leakage of OTP Code anywhere
fadymak
pushed a commit
that referenced
this pull request
Sep 30, 2025
🤖 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>
fadymak
pushed a commit
that referenced
this pull request
Sep 30, 2025
## What kind of change does this PR introduce? Complement to #1668 Add OpenAPI specification for MFA (Phone). In particular, updates the parameters and `/enroll` `/challenge` and `/verify`
This file contains hidden or 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
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?
We introduce MFA (Phone) to allow developers to enroll a Phone-based MFA factor. We maintain the existing pattern of enroll, challenge, verify.
The frontend bindings are listed here but as a summary
enroll-enroll({factorType: 'phone', phoneNumber:'<e164-phone-number>', friendlyName:'<optional-name>'})challenge-challenge({channel: '<whatsapp>'}). If no channel is specified it defaults tosms.How it works
This is and additive change - there should be no impact on the existing flow unless one specifies
{'factor_type': 'phone'}in the request body.Key Details
Configuration
ENROLL_ENABLEDandVERIFY_ENABLEDtoggles or both TOTP and Phone Factors.Integration with Hooks
When used with the Send SMS Hook there's an indicator for the SMSType specifying that it is an MFA Hook. Use as needed.
Security Concerns