Skip to content

Remove redirect from account verification (to: preserve intent)#13095

Merged
mekarpeles merged 3 commits into
masterfrom
fix-preserve-intent
Jul 2, 2026
Merged

Remove redirect from account verification (to: preserve intent)#13095
mekarpeles merged 3 commits into
masterfrom
fix-preserve-intent

Conversation

@mekarpeles

Copy link
Copy Markdown
Member

Closes #12764

This pull request makes a small change to the GET method in openlibrary/plugins/upstream/account.py, removing the redirect parameter from the account_login().login call. This simplifies the login flow by no longer specifying a redirect after login.

Fixed preserve intent which requires no redirect to be present.

Removed the redirect parameter from account login.
Copilot AI review requested due to automatic review settings July 2, 2026 16:32
@github-actions github-actions Bot added the Priority: 2 Important, as time permits. [managed] label Jul 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the legacy web.py /account/verify flow in openlibrary/plugins/upstream/account.py to stop passing a redirect parameter into the post-verification auto-login, intended to support the “preserve intent” authentication flow.

Changes:

  • Removes the redirect argument from the account_login().login(...) call made after successful account verification.

Comment thread openlibrary/plugins/upstream/account.py Outdated
…ropping it

The prior fix for the preserve-intent cookie removed *all* redirect
forwarding from account_verify.GET(), including a genuine ?redirect=
query param, breaking test_valid_token_honors_redirect_param. Only
omit redirect when the caller didn't request one, mirroring the
existing conditional-kwarg pattern used for issuer_token in
InternetArchiveAccount.issue_s3_key.
@mekarpeles mekarpeles merged commit 29ef7e0 into master Jul 2, 2026
8 checks passed
@mekarpeles

Copy link
Copy Markdown
Member Author

Reviewed w/ @jimchamp

@mekarpeles mekarpeles deleted the fix-preserve-intent branch July 2, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority: 2 Important, as time permits. [managed]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants