How can I get the session in a route handler in the app folder? #4293
-
|
I can use getSession() in an api route in the pages folder. How can I get the session in a route handler in the app folder? |
Beta Was this translation helpful? Give feedback.
Answered by
siddhsuresh
Jan 26, 2024
Replies: 1 comment
-
|
@elsueno you can use documentation of these functions are here: https://blitzjs.com/docs/usage-next-13#blitz-auth (though not specific to a |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
siddhsuresh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@elsueno you can use
getBlitzContextto be imported fromblitz-server.ts, if this is for using a resolver in aroute.tsfile you can directly useinvokedocumentation of these functions are here: https://blitzjs.com/docs/usage-next-13#blitz-auth (though not specific to a
route.tsfile)