(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.
NathanGitHub
GitHub - NathanLaing/beth
Contribute to NathanLaing/beth development by creating an account on GitHub.
3 Replies
taking a look
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-callbackLucia
GitHub OAuth
Turns out I was importing
parseCookie
from elysia/cookie
rather than lucia/utils
... 😩 😅