-
Notifications
You must be signed in to change notification settings - Fork 0
Fixing Re-authentication with passkeys #10
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
base: improve-auth-user-experience
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -110,10 +110,10 @@ public void authenticate(AuthenticationFlowContext context) { | |||||||
| formData.add("rememberMe", "on"); | ||||||||
| } | ||||||||
| } | ||||||||
| // setup webauthn data when the user is not already selected | ||||||||
| if (webauthnAuth != null && webauthnAuth.isPasskeysEnabled()) { | ||||||||
| webauthnAuth.fillContextForm(context); | ||||||||
| } | ||||||||
| } | ||||||||
| // setup webauthn data when passkeys enabled | ||||||||
| if (isConditionalPasskeysEnabled(context.getUser())) { | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
| webauthnAuth.fillContextForm(context); | ||||||||
| } | ||||||||
| Response challengeResponse = challenge(context, formData); | ||||||||
| context.challenge(challengeResponse); | ||||||||
|
|
@@ -134,8 +134,8 @@ protected Response challenge(AuthenticationFlowContext context, MultivaluedMap<S | |||||||
|
|
||||||||
| @Override | ||||||||
| protected Response challenge(AuthenticationFlowContext context, String error, String field) { | ||||||||
| if (context.getUser() == null && webauthnAuth != null && webauthnAuth.isPasskeysEnabled()) { | ||||||||
| // setup webauthn data when the user is not already selected | ||||||||
| if (isConditionalPasskeysEnabled(context.getUser())) { | ||||||||
| // setup webauthn data when possible | ||||||||
| webauthnAuth.fillContextForm(context); | ||||||||
| } | ||||||||
| return super.challenge(context, error, field); | ||||||||
|
|
@@ -157,4 +157,8 @@ public void close() { | |||||||
|
|
||||||||
| } | ||||||||
|
|
||||||||
| protected boolean isConditionalPasskeysEnabled(UserModel user) { | ||||||||
| return webauthnAuth != null && webauthnAuth.isPasskeysEnabled() && user != null; | ||||||||
| } | ||||||||
|
|
||||||||
| } | ||||||||
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.
🛑 Critical: This calls isConditionalPasskeysEnabled() with no arguments, but the available method signature is isConditionalPasskeysEnabled(UserModel). This will not compile and blocks the build. Pass the current user to the method.