Skip to content

Conversation

@0xnmn
Copy link
Contributor

@0xnmn 0xnmn commented Feb 3, 2026

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-code support.

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 old TwoFactorRequiresInteractive error 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.

@0xnmn 0xnmn force-pushed the naman/skip-2fa-for-token-auth branch from bceb752 to 117e0b9 Compare February 3, 2026 17:06
@0xnmn 0xnmn added the release/minor Author minor release label Feb 3, 2026
@0xnmn 0xnmn force-pushed the naman/skip-2fa-for-token-auth branch from 117e0b9 to b0b85e4 Compare February 3, 2026 17:10
@0xnmn
Copy link
Contributor Author

0xnmn commented Feb 3, 2026

@cursor review

@0xnmn 0xnmn force-pushed the naman/skip-2fa-for-token-auth branch from b0b85e4 to c14c0e7 Compare February 3, 2026 17:13
@0xnmn
Copy link
Contributor Author

0xnmn commented Feb 3, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@0xnmn
Copy link
Contributor Author

0xnmn commented Feb 3, 2026

@cursor review

@0xnmn 0xnmn force-pushed the naman/skip-2fa-for-token-auth branch from c14c0e7 to 1e18ebb Compare February 3, 2026 17:20
Copy link

@cursor cursor bot left a 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.

Copy link

@cursor cursor bot left a 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.

@0xnmn 0xnmn force-pushed the naman/skip-2fa-for-token-auth branch 2 times, most recently from 99a0852 to 72e048b Compare February 3, 2026 17:52
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
@0xnmn 0xnmn force-pushed the naman/skip-2fa-for-token-auth branch from 72e048b to 1a42d19 Compare February 3, 2026 18:04
@0xnmn 0xnmn merged commit 3181223 into master Feb 3, 2026
7 checks passed
@0xnmn 0xnmn deleted the naman/skip-2fa-for-token-auth branch February 3, 2026 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/minor Author minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant