Skip to content

How to access the current user session data through api routes using NextJS #3386

Answered by 1finedev
pablolucio97 asked this question in Help
Discussion options

You must be logged in to vote

const session = await getSession({req})

Replies: 5 comments 8 replies

Comment options

You must be logged in to vote
1 reply
@meAnurag
Comment options

Comment options

You must be logged in to vote
2 replies
@Simonbrl
Comment options

@piclez
Comment options

Answer selected by balazsorban44
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@tomryanx
Comment options

@adamjakab
Comment options

@adamjakab
Comment options

@DavidForDev
Comment options

@SushWar
Comment options

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
Help
Labels
question Ask how to do something or how something works
Converted from issue

This discussion was converted from issue #3385 on December 07, 2021 21:03.