Skip to content
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

Fix adding an account doesn't automatically switch to it #1779 #1781

Closed
wants to merge 1 commit into from

Conversation

riccardobl
Copy link
Member

@riccardobl riccardobl commented Dec 30, 2024

Fixes #1779

The issue was that the code responsible for setting the default multi-auth cookie for the user on their first login was being called on every authentication, including when adding a new account. This caused the authentication cookies to be set but then immediately overwritten by the default cookie, reverting to the previous user.

Screenshots

before the patch
image

after the patch
image

Checklist

Are your changes backwards compatible? Please answer below:
yes

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
Tested with sndev login and nostr nip05

  • the default multi_auth cookie is set on first login
  • switching happens automatically when a new account is added
  • switching to anon works
  • switching to another account works

@riccardobl riccardobl changed the title Switchbug Fix adding an account doesn't automatically switch to it #1779 Dec 30, 2024
@huumn huumn requested a review from ekzyis December 30, 2024 22:32
Copy link
Member

@ekzyis ekzyis left a comment

Choose a reason for hiding this comment

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

I've noticed that this breaks adding an account when you're switched to anon, see #1783 for details:

2024-12-31.03-25-04.mp4

@huumn huumn closed this Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding a new Switch Account does not switch to new account
3 participants