about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-09-30 05:26:29 +0200
committerGitHub <noreply@github.com>2021-09-30 05:26:29 +0200
commit24f9ea781850ee8d105aa3e396eaef8499bc5efc (patch)
tree5f961eba4c5878b9e5d653dc4d08f0c02a84f457 /app
parent2e549fa2d5963c617a0670245b769e5d276d17e8 (diff)
Fix webauthn secure key authentication (#16792)
* Add tests

* Fix webauthn secure key authentication

Fixes #16769
Diffstat (limited to 'app')
-rw-r--r--app/controllers/auth/sessions_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb
index 2c3d510cb..d48abb707 100644
--- a/app/controllers/auth/sessions_controller.rb
+++ b/app/controllers/auth/sessions_controller.rb
@@ -42,7 +42,7 @@ class Auth::SessionsController < Devise::SessionsController
   end
 
   def webauthn_options
-    user = find_user
+    user = User.find_by(id: session[:attempt_user_id])
 
     if user&.webauthn_enabled?
       options_for_get = WebAuthn::Credential.options_for_get(