Skip to content

FIX: Bug with 2FA setup right after signup #32754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2025
Merged

Conversation

pmusaraj
Copy link
Contributor

No description provided.

@pmusaraj pmusaraj requested a review from nullchristo May 15, 2025 19:50
Copy link
Contributor

@nullchristo nullchristo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@@ -2263,6 +2263,10 @@ def secure_session_confirmed?
secure_session["confirmed-session-#{current_user.id}"] == "true"
end

def session_is_trusted?
secure_session_confirmed? || user_just_created
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, what is special about the secure session that a user which has just has been created doesn't have it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The confirmed secure session is done with a check on the password or the passkey while user is already logged in. It's an extra security step. Not practically useful for a new user, almost zero chance that a new account is immediately compromised, so we remove the extra friction here for users. (Particularly annoying for sites with 2FA enforced).

@pmusaraj pmusaraj merged commit 071ec5a into main May 16, 2025
17 checks passed
@pmusaraj pmusaraj deleted the fix-2fa-right-after-login branch May 16, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants