Enable Rubocop HTTP status rules (#23717)
This commit is contained in:
parent
bd1d57c230
commit
aef0051fd0
32 changed files with 77 additions and 242 deletions
|
@ -57,10 +57,10 @@ module TwoFactorAuthenticationConcern
|
|||
|
||||
if valid_webauthn_credential?(user, webauthn_credential)
|
||||
on_authentication_success(user, :webauthn)
|
||||
render json: { redirect_path: after_sign_in_path_for(user) }, status: :ok
|
||||
render json: { redirect_path: after_sign_in_path_for(user) }, status: 200
|
||||
else
|
||||
on_authentication_failure(user, :webauthn, :invalid_credential)
|
||||
render json: { error: t('webauthn_credentials.invalid_credential') }, status: :unprocessable_entity
|
||||
render json: { error: t('webauthn_credentials.invalid_credential') }, status: 422
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue