Paul on Nostr: Just spent over an hour trying to work out why a bookmarklet didn't work, even though ...
Just spent over an hour trying to work out why a bookmarklet didn't work, even though copying and pasting the generated URL into a new tab did.
Turns out you need samesite=Lax rather than samesite=Strict on your session cookie, otherwise it doesn't get sent and the app thinks you're not logged in (and in this case, redirects you to the login page, but that request does get the session cookie and therefore redirects you back to where you came from...)
Published at
2024-07-09 15:12:50Event JSON
{
"id": "eea9cd153741c06a0aad3c32cf1a1700b996db0110927ac682048b1ed0f1d34f",
"pubkey": "cd1235fa453225b15d2633014c95ac79d7f388669e8a81580ec991b915ff88c8",
"created_at": 1720537970,
"kind": 1,
"tags": [
[
"proxy",
"https://fosstodon.org/@pwaring/112757176435627999",
"web"
],
[
"proxy",
"https://fosstodon.org/users/pwaring/statuses/112757176435627999",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://fosstodon.org/users/pwaring/statuses/112757176435627999",
"pink.momostr"
],
[
"expiration",
"1723129972"
]
],
"content": "Just spent over an hour trying to work out why a bookmarklet didn't work, even though copying and pasting the generated URL into a new tab did.\n\nTurns out you need samesite=Lax rather than samesite=Strict on your session cookie, otherwise it doesn't get sent and the app thinks you're not logged in (and in this case, redirects you to the login page, but that request does get the session cookie and therefore redirects you back to where you came from...)",
"sig": "c958c26a0e97932865756e9c80df78e6171750c87cc4734fb71da4c0a19efe75f58a8582a22207b9834f38158adc14f1d1c275ebf6200e43cc8f640e5862d2ae"
}