Skip to content

Missing state on session when callback route is hit? #156

Answered by sergiodxa
tconroy asked this question in Q&A
Discussion options

You must be logged in to vote

This usually happens when there’s no session cookie set, which usually happens because of a misconfigured session cookie.

Most of your code looks fine except the maxAge 0, that is telling the browser the cookie max age is 0 seconds so it’s immediately stale, try removing that or using a larger value like a day.

If you remove it the cookie will live until the user closes the browser.

Replies: 4 comments 10 replies

Comment options

You must be logged in to vote
7 replies
@tconroy
Comment options

@jrnxf
Comment options

@jackbravo
Comment options

@ajtaylor
Comment options

@sergiodxa
Comment options

Answer selected by tconroy
Comment options

You must be logged in to vote
3 replies
@daniel-a-marshall
Comment options

@sergiodxa
Comment options

@fullstackwebdev
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
10 participants