Browse Source

Fix redirection when succeeded WebAuthn (#17098)

closed-social-glitch-2
heguro 2 years ago
committed by GitHub
parent
commit
41503507ec
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/controllers/concerns/two_factor_authentication_concern.rb

+ 1
- 1
app/controllers/concerns/two_factor_authentication_concern.rb View File

@ -57,7 +57,7 @@ module TwoFactorAuthenticationConcern
if valid_webauthn_credential?(user, webauthn_credential)
on_authentication_success(user, :webauthn)
render json: { redirect_path: root_path }, status: :ok
render json: { redirect_path: after_sign_in_path_for(user) }, status: :ok
else
on_authentication_failure(user, :webauthn, :invalid_credential)
render json: { error: t('webauthn_credentials.invalid_credential') }, status: :unprocessable_entity

Loading…
Cancel
Save