Skip to content
Discussion options

You must be logged in to vote

You can get the session by doing a fetch call to : /api/auth/session

https://next-auth.js.org/getting-started/rest-api#get-apiauthsession

alternatively you can proxy your API requests through a Next.js API route and use either getSession or getToken and attach the access token there before sending the request to your external api.

Replies: 1 comment 2 replies

Comment options

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

@balazsorban44
Comment options

Answer selected by balazsorban44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2101 on May 31, 2021 00:21.