mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-23 21:15:05 +01:00
Fix redirection when succeeded WebAuthn (#17098)
This commit is contained in:
parent
66baa629ea
commit
41503507ec
@ -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…
Reference in New Issue
Block a user