Lambo
Lambo
Explore posts from servers
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
That’s great, I’ll give it a read. Thanks for the recommendation
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
Thank you so much, finally unblocked!
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
Looks like sameSite: 'strict' was doing it. lax is fine
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
Cool, let me start adding things back
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
Oh wait, I had to remove the c.header() as that just overwrite. Getting a result now
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
No different with lax or CORS or not setting any options
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
I can have a play around in a few hours after work
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
No CORS setup
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
Yeah. So I have GET /auth/callback which sets the cookie.
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
Hey @ambergristle - still no luck, unfortunately. 1. I changed secure to c.env.WORKER_ENV === 'prod' 2. Tried setting domain to http://localhost:8788, localhost:8788 and localhost 3. Removed expires All of these log undefined:
const x = getCookie(c, 'auth');

console.log(c.header('Cookie'));
console.log(c.header('Set-Cookie'));
console.log(x);
const x = getCookie(c, 'auth');

console.log(c.header('Cookie'));
console.log(c.header('Set-Cookie'));
console.log(x);
...and I see nothing in the browser suggesting a cookie is set either Any other pointers you may have?
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
I’m using Workers Pages Functions locally if it’s of any reference
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
Hey, thanks for the response (and no worries about the pocket typing haha). I am in bed now but I will give those amends a go tomorrow. I could not see the cookie set on the client, but assumed maybe it was because it was secure or something, but your explanation makes sense.
43 replies
HHono
Created by Lambo on 2/5/2025 in #help
Cookie Comes Back As undefined
I don’t follow?
43 replies