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

feat: add MFA for WebAuthn #1775

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

feat: add MFA for WebAuthn #1775

wants to merge 15 commits into from

Conversation

J0
Copy link
Contributor

@J0 J0 commented Sep 18, 2024

What kind of change does this PR introduce?

Adds MFA for WebAuthn

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.

example.env Outdated
@@ -233,3 +233,6 @@ GOTRUE_HOOK_CUSTOM_SMS_PROVIDER_SECRET=""
# Test OTP Config
Copy link
Contributor Author

Choose a reason for hiding this comment

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

update openapi

@@ -0,0 +1,2 @@
alter table {{ index .Options "Namespace" }}.mfa_factors add column if not exists web_authn_credential jsonb null;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reinstate aaguid

}
for _, factor := range user.Factors {
switch {
case factor.FriendlyName == params.FriendlyName:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Validation checks can be condensed into a single function. Work for that is done here: #1780

@J0
Copy link
Contributor Author

J0 commented Sep 28, 2024

Not quite ready yet, please check back after 12pm CEST tomorrow..

internal/models/user.go Outdated Show resolved Hide resolved
internal/models/user.go Outdated Show resolved Hide resolved
internal/models/user.go Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Sep 30, 2024

Pull Request Test Coverage Report for Build 11113961168

Details

  • 158 of 366 (43.17%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.3%) to 57.677%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/models/challenge.go 18 20 90.0%
internal/models/user.go 9 18 50.0%
internal/models/factor.go 13 32 40.63%
internal/api/mfa.go 117 295 39.66%
Totals Coverage Status
Change from base Build 11077276448: -0.3%
Covered Lines: 9493
Relevant Lines: 16459

💛 - Coveralls

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.

3 participants