Skip to content

How can I get the session in a route handler in the app folder? #4293

Answered by siddhsuresh
elsueno asked this question in Q&A
Discussion options

You must be logged in to vote

@elsueno you can use getBlitzContext to be imported from blitz-server.ts, if this is for using a resolver in a route.ts file you can directly use invoke

documentation of these functions are here: https://blitzjs.com/docs/usage-next-13#blitz-auth (though not specific to a route.ts file)

Replies: 1 comment

Comment options

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