(mental) cookie is crumbling

Hey all 👋 I'm following along to the recent YT video and am having some cookie issues when authenticating with Google 🍪 I'm getting into the callback section of the controller fine and then returning unauthorised as my state and state_cookie don't match. Problem is I can see the state_cookie.setter contains my google_auth_state=COOKIE_VALUE I just can't figure out how to access it! I'm fairly confident I've copied the code faithfully. Link to repo for those interested https://github.com/NathanLaing/beth Many thanks in advance. Nathan
GitHub
GitHub - NathanLaing/beth
Contribute to NathanLaing/beth development by creating an account on GitHub.
3 Replies
whatplan
whatplan12mo ago
taking a look
whatplan
whatplan12mo ago
both state and state_cookie should just be strings or undefined this part is ripped exactly from lucia docs: https://lucia-auth.com/guidebook/github-oauth/#validate-callback
Nathan (Charybdiss)
Turns out I was importing parseCookie from elysia/cookie rather than lucia/utils... 😩 😅
Want results from more Discord servers?
Add your server