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 have next-auth with a Strava provider and Prisma adapter. My Prisma schema has an Account model as suggested in the docs, including the scope parameter.
The scopes are correctly built into the authorization URL. After authenticating with the provider, it calls back the app including the scope parameter that was actually set during authentication, e.g.:
I would like to access this either before account creation (in some callback/event) but also it seems like it is supposed to be stored as well, however, nothing gets stored and I cannot access it on handlers like token.request, userinfo.request.
Set up a oAuth provider using some specific scope
Authenticate
Try to access the scope actually set during the authentication (might be different from required scope)
Expected behavior
scope is accessible/stored along with Account
The text was updated successfully, but these errors were encountered:
dlbnco
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Dec 16, 2024
Environment
Reproduction URL
https://github.com/dlbnco/next-auth-example
Describe the issue
I have next-auth with a Strava provider and Prisma adapter. My Prisma schema has an Account model as suggested in the docs, including the scope parameter.
I set the scope required for my app as following:
The scopes are correctly built into the authorization URL. After authenticating with the provider, it calls back the app including the scope parameter that was actually set during authentication, e.g.:
I would like to access this either before account creation (in some callback/event) but also it seems like it is supposed to be stored as well, however, nothing gets stored and I cannot access it on handlers like token.request, userinfo.request.
Some relevant files:
https://github.com/nextauthjs/next-auth/blob/v4/packages/next-auth/src/core/lib/oauth/callback.ts
https://github.com/nextauthjs/next-auth/blob/v4/packages/next-auth/src/core/lib/oauth/client.ts
How to reproduce
Set up a oAuth provider using some specific scope
Authenticate
Try to access the scope actually set during the authentication (might be different from required
scope
)Expected behavior
scope
is accessible/stored along withAccount
The text was updated successfully, but these errors were encountered: