mirror of
https://github.com/we-promise/sure.git
synced 2026-04-13 17:14:05 +00:00
Another attempt at fixing MFA issues
This commit is contained in:
@@ -30,6 +30,15 @@ class MfaController < ApplicationController
|
||||
session.delete(:mfa_user_id)
|
||||
@session = create_session_for(@user)
|
||||
Rails.logger.info "MFA verification successful for user #{@user.id}. Session created: #{@session.id}"
|
||||
|
||||
# Explicitly set the cookie again to ensure it's properly set
|
||||
cookies.signed.permanent[:session_token] = {
|
||||
value: @session.id,
|
||||
httponly: true,
|
||||
same_site: :lax
|
||||
}
|
||||
|
||||
# Use turbo: false to ensure a full page reload
|
||||
redirect_to root_path, turbo: false
|
||||
else
|
||||
flash.now[:alert] = t(".invalid_code")
|
||||
|
||||
Reference in New Issue
Block a user