-
Notifications
You must be signed in to change notification settings - Fork 135
Skip 2FA prompt for token-based auth #781
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
Conversation
bceb752 to
117e0b9
Compare
117e0b9 to
b0b85e4
Compare
|
@cursor review |
b0b85e4 to
c14c0e7
Compare
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
|
@cursor review |
c14c0e7 to
1e18ebb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because Privacy Mode (Legacy) is turned on. To enable Bugbot Autofix, switch your privacy mode in the Cursor dashboard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because Privacy Mode (Legacy) is turned on. To enable Bugbot Autofix, switch your privacy mode in the Cursor dashboard.
99a0852 to
72e048b
Compare
Token-based auth (RAILWAY_TOKEN, RAILWAY_API_TOKEN) is non-interactive and bypasses 2FA on the backend anyway. Only prompt for 2FA when using session-based auth from `railway login`. https://discord.com/channels/713503345364697088/1467957064595800156
72e048b to
1a42d19
Compare
Token-based auth (RAILWAY_TOKEN, RAILWAY_API_TOKEN) is non-interactive and bypasses 2FA on the backend. Only prompt for 2FA when using session-based auth from railway login.
https://discord.com/channels/713503345364697088/1467957064595800156
Note
Medium Risk
Touches authentication/2FA behavior across multiple destructive commands (project/environment/function/volume delete), so incorrect branching could weaken safeguards or break CI/non-interactive usage.
Overview
Deletion flows now share a centralized 2FA gate via new
util::two_factor::validate_two_factor_if_enabled, and the function delete command gains--2fa-codesupport.The new helper skips 2FA entirely when using
RAILWAY_TOKEN/RAILWAY_API_TOKEN(token auth), and otherwise prompts/accepts a provided code for session auth; the oldTwoFactorRequiresInteractiveerror is removed in favor of a direct non-interactive bail message.Written by Cursor Bugbot for commit 1a42d19. This will update automatically on new commits. Configure here.