LG 8622 Removes stand alone error page for F/T Unlock (only WebAuthn Method)#8716
Conversation
99d4efc to
bc4c13e
Compare
spec/controllers/two_factor_authentication/webauthn_verification_controller_spec.rb
Outdated
Show resolved
Hide resolved
8ba4476 to
113bdfd
Compare
|
When I set up Face/Touch unlock as my only method on Chrome and then try to authenticate on the same machine, but on Firefox, I am getting a 404. Is this an expected behavior? |
No it shouldn't go to a not found page. What path is showing when it 404s? |
|
Thank you @jmdembe I'll try to see why it's trying to get that path in Firefox. |
|
I think that error page might be related to what I'm working on in LG-10177 / #8723, where we redirect the user to the error page if they're signing in and a platform authenticator is not available on the device (specifically, this code). We probably want to keep that error page around as long as it's used, which will be much less between this ticket and mine. I expect it'd continue to be used for a scenario where someone tries logging in from a device which doesn't support WebAuthn at all (although maybe this falls outside our browser support commitments). |
…nd error page for stand alone error messaging
…od in the controller the redirect to please try again view
952eebe to
f0c772b
Compare
|
@jmdembe and @aduth please take a look in particular how I solved the webauthn verification controller on line 30. I'm mostly concerned about inadvertently short circuiting legitimate errors. Firefox no longer sends a 404 or put you on that dead end page anymore. It does tell you to Connect your security key which is confusing and not exactly what I would expect. Safari still works as before and Chrome where I have created the Touch authentication continues to work. |
| flash[:error] = t( | ||
| 'two_factor_authentication.webauthn_error.multiple_methods', | ||
| link: view_context.link_to( | ||
| t('two_factor_authentication.webauthn_error.additional_methods_link'), | ||
| login_two_factor_options_path, | ||
| ), | ||
| ) | ||
| redirect_to login_two_factor_webauthn_url(platform: params[:platform]) |
There was a problem hiding this comment.
Curious, how do the code changes here relate to the ticket. I'm not sure I follow why we'd need them, and the tests pass without them.
There was a problem hiding this comment.
The original code that was there
| flash[:error] = t( | |
| 'two_factor_authentication.webauthn_error.multiple_methods', | |
| link: view_context.link_to( | |
| t('two_factor_authentication.webauthn_error.additional_methods_link'), | |
| login_two_factor_options_path, | |
| ), | |
| ) | |
| redirect_to login_two_factor_webauthn_url(platform: params[:platform]) | |
| def error; end |
is what was redirecting Firefox to the dead end page.
For whatever reason Safari was working without the code change. I may be missing something elsewhere that would make the solution work without this.
There was a problem hiding this comment.
I have taken out that change. Thank you.

🎫 Ticket
Link to the relevant ticket.
LG_8622
🛠 Summary of changes
Removes the control statement checking if multiple factors are enabled in handle_invalid_webauthn so in any case it will redirect to login_two_factor_webauthn_url rather than the stand alone error page.
Revised the Spec to account for that change.
Deleted the stand alone error page erb file.
📜 Testing Plan
Provide a checklist of steps to confirm the changes.
👀 Screenshots
Details
Previous UI
Details
Revised UI