You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to authenticate the user to 3rd party application via oauth2. So the user is already logged in to our (next.js) app, but I need to validate their access to another service, retrieve the access token and be able to interact with their API on behalf of the user. I saw that there is a custom oauth provider: https://next-auth.js.org/configuration/providers/oauth#using-a-custom-provider
However, It is not entirely clear how to only retrieve the access token but not manage the session. How can I achieve such behaviour with next-auth?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm trying to authenticate the user to 3rd party application via oauth2. So the user is already logged in to our (next.js) app, but I need to validate their access to another service, retrieve the access token and be able to interact with their API on behalf of the user. I saw that there is a custom oauth provider: https://next-auth.js.org/configuration/providers/oauth#using-a-custom-provider
However, It is not entirely clear how to only retrieve the access token but not manage the session. How can I achieve such behaviour with next-auth?
Beta Was this translation helpful? Give feedback.
All reactions