1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-24 15:49:39 +02:00

Potential fix for MFA login issues

This commit is contained in:
Josh Pigford 2025-03-05 13:04:45 -06:00
parent 381e39bea8
commit 071ad52c7f

View file

@ -29,7 +29,8 @@ class MfaController < ApplicationController
if @user&.verify_otp?(params[:code])
session.delete(:mfa_user_id)
@session = create_session_for(@user)
redirect_to root_path
Rails.logger.info "MFA verification successful for user #{@user.id}. Session created: #{@session.id}"
redirect_to root_path, turbo: false
else
flash.now[:alert] = t(".invalid_code")
render :verify, status: :unprocessable_entity