Fix OAuth authorization resume after sign-up#17
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
start_new_session_forcorrectly preservedsession[:return_to_after_authenticating]across session rotation, butUsersController#createalways redirected successful registrations to the dashboard. Unlike sign-in, signup never consumed the saved OAuth URL, so a new user connecting an MCP client left the client waiting for an authorization callback.User impact
A first-time PasteHTML user can now choose Sign up during a Claude, Codex, or other MCP OAuth flow and return directly to the consent screen. Existing signup behavior remains unchanged outside an interrupted authentication flow.
Validation
CI=1 bundle exec rails test: 440 runs, 2,053 assertions, 0 failures, 0 errorsbundle exec rubocop: 128 files, no offensesbundle exec brakeman --no-pager: zero warningsRAILS_ENV=test bundle exec rails zeitwerk:check: all good