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: rename cookie and make it domain level #98

Merged
merged 1 commit into from
Jun 28, 2023
Merged

Conversation

im-adithya
Copy link
Member

@im-adithya im-adithya commented Jun 28, 2023

⚠️ Deploying this change will logout all users

Fixes the cookie issue, which is stopping logins and logouts

Description

The issue is that the alby_nostr_wallet_connect cookie was saved in users' browsers under the nwc.getalby.com subdomain, and currently we add the alby_nostr_wallet_connect cookie under .getalby.com domain (and in other places, we don't specify the domain cause it does key value matching and we don't know if we get the cookie with subdomain or main domain). So instead of clearing it @bumi said it's better to rename the cookie.

(apart from the issue Moritz mentioned in slack, you can't also log out if you're logged in already, that's because the cookie which is being cleared is of the subdomain and the main domain cookie is never being touched so when it fetches to log you in, this time it gets the main domain cookie (because, key value matching) and shows you the page, but the same thing (k-v matching) isn't applicable for delete as you have to explicitly mention if you need to delete a domain level cookie)

@im-adithya im-adithya requested review from bumi and kiwiidb June 28, 2023 11:46
@kiwiidb kiwiidb merged commit b2b32df into main Jun 28, 2023
@kiwiidb kiwiidb deleted the task-cookie-fix branch June 28, 2023 13:47
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.

2 participants