Skip to content

fix: enroll mfa totp #693

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

Conversation

grdsdev
Copy link
Contributor

@grdsdev grdsdev commented Mar 25, 2025

What kind of change does this PR introduce?

fix #684

What is the current behavior?

Please link any relevant issues here.

What is the new behavior?

Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

Copy link

linear bot commented Mar 25, 2025

@grdsdev grdsdev requested a review from silentworks March 25, 2025 15:51
Comment on lines +660 to +665
@model_validator_v1_v2_compat
def validate_phone_required_for_phone_type(cls, values: dict) -> dict:
if values.get("type") == "phone" and not values.get("phone"):
raise ValueError("phone is required when type is 'phone'")
return values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@silentworks is this the correct way of doing it?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah that's correct.

@grdsdev grdsdev marked this pull request as ready for review March 25, 2025 15:53
@coveralls
Copy link

Pull Request Test Coverage Report for Build 14064176131

Details

  • 12 of 13 (92.31%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on guilherme/clibs-122-mfa-bug-can-not-enroll-mfa-use-factor_type-totp at 79.391%

Changes Missing Coverage Covered Lines Changed/Added Lines %
supabase_auth/types.py 12 13 92.31%
Totals Coverage Status
Change from base Build 14062871539: 79.4%
Covered Lines: 1591
Relevant Lines: 2004

💛 - Coveralls

@grdsdev grdsdev merged commit ca9fcf3 into main Mar 26, 2025
11 checks passed
@grdsdev grdsdev deleted the guilherme/clibs-122-mfa-bug-can-not-enroll-mfa-use-factor_type-totp branch March 26, 2025 11:04
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.

[MFA Bug] Can not enroll MFA use factor_type = "totp"
3 participants