Skip to content

Commit

Permalink
Fix login being broken due to inaccurately applied backport fix in 3.4.2
Browse files Browse the repository at this point in the history
See #16943
  • Loading branch information
Gargron committed Nov 6, 2021
1 parent 8a74d85 commit 5c47a18
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 4 deletions.
1 change: 0 additions & 1 deletion app/controllers/auth/sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ def new
def create
super do |resource|
resource.update_sign_in!(request, new_sign_in: true)
remember_me(resource)
flash.delete(:notice)
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def authenticate_with_sign_in_token
def authenticate_with_sign_in_token_attempt(user)
if valid_sign_in_token_attempt?(user)
clear_attempt_from_session
remember_me(user)
sign_in(user)
else
flash.now[:alert] = I18n.t('users.invalid_sign_in_token')
Expand Down
2 changes: 0 additions & 2 deletions app/controllers/concerns/two_factor_authentication_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ def authenticate_with_two_factor_via_webauthn(user)

if valid_webauthn_credential?(user, webauthn_credential)
clear_attempt_from_session
remember_me(user)
sign_in(user)
render json: { redirect_path: root_path }, status: :ok
else
Expand All @@ -68,7 +67,6 @@ def authenticate_with_two_factor_via_webauthn(user)
def authenticate_with_two_factor_via_otp(user)
if valid_otp_attempt?(user)
clear_attempt_from_session
remember_me(user)
sign_in(user)
else
flash.now[:alert] = I18n.t('users.invalid_otp_token')
Expand Down

0 comments on commit 5c47a18

Please sign in to comment.