-
-
Notifications
You must be signed in to change notification settings - Fork 968
Refactor WebAuthn Verification logic #3720
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
Refactor WebAuthn Verification logic #3720
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3720 +/- ##
==========================================
+ Coverage 98.75% 98.76% +0.01%
==========================================
Files 207 208 +1
Lines 5143 5119 -24
==========================================
- Hits 5079 5056 -23
+ Misses 64 63 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Modulo some tests, LGTM.
bd25bae
to
a4a0cac
Compare
There was a problem hiding this comm 10000 ent.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To add coverage for an indirect change https://app.codecov.io/gh/rubygems/rubygems.org/pull/3720/indirect-changes
…o WebAuthn Verifiable concern
Extract behaviour in webauthn_credential_verified? to helper methods
7b96e4c
to
22fb663
Compare
22fb663
to
e6e2d95
Compare
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.
One nit, otherwise LGTM.
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.
@simi @segiddins do you have any concerns with adding tests for a controller concern? I noticed that none of the other controller concerns have tests and that they are tested indirectly through the controller tests.
As mentioned above, in creating a controller concern, I wanted to isolate testing the logic + gives an example of the interface.
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.
That's totally OK!
What problem are you solving?
There's a lot of duplication of the WebAuthn verification logic between the sessions, email confirmation, password and webauthn verification controllers.
What approach did you choose and why?
Created a controller concern
WebauthnVerifiable
that extracts the behaviour ofAll behaviour should remain the same, commits would show how the all logic is consolidated into the concern.
What should reviewers focus on?
Testing
Should be able to MFA using webauthn when signing in, reset password, change email and gem signin