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
tbrundige opened this issue
May 26, 2024
· 3 comments
· May be fixed by #11960
Labels
adaptersChanges related to the core code concerning database adaptersbugSomething isn't workingtriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
While updating the schema.prisma to providerAccountId Int @map("provider_account_id") fixes the issue. I believe this will break other providers that are using a string and limit the project to only the Strava provider.
How to reproduce
Create/log in to a Strava account and create an API application to get a client id/secret.
Note: Once logged in to Strava go to this url www.strava.com/settings/api and grab the client/secret after creating the API application.
Clone the provided repo.
Populate the following values in .env in the root of the project
Start/ensure the postgres database is running.
Run npm install && npm run dev
Open web browser to localhost:3000
Click "Signin with Strava"
Log in to Strava and you should be redirected to an AuthError page and the server should print out.
The user should be able to authenticate successfully .
Possible solution: check the type of the providerId from the response, convert the int to the string value and persist in the database as a string.
The text was updated successfully, but these errors were encountered:
tbrundige
added
adapters
Changes related to the core code concerning database adapters
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
May 26, 2024
adaptersChanges related to the core code concerning database adaptersbugSomething isn't workingtriageUnseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
Adapter type
@auth/prisma-adapter
Environment
Reproduction URL
https://github.com/tbrundige/authjs-adapter-issue
Describe the issue
When using the Strava provider with the Prisma adapter, when a user attempts to authenticate the following error occurs.
While updating the schema.prisma to
providerAccountId Int @map("provider_account_id")
fixes the issue. I believe this will break other providers that are using a string and limit the project to only the Strava provider.How to reproduce
Create/log in to a Strava account and create an API application to get a client id/secret.
Note: Once logged in to Strava go to this url www.strava.com/settings/api and grab the client/secret after creating the API application.
Clone the provided repo.
Populate the following values in .env in the root of the project
Start/ensure the postgres database is running.
Run
npm install && npm run dev
Open web browser to localhost:3000
Click "Signin with Strava"
Log in to Strava and you should be redirected to an AuthError page and the server should print out.
Expected behavior
The user should be able to authenticate successfully .
Possible solution: check the type of the providerId from the response, convert the int to the string value and persist in the database as a string.
The text was updated successfully, but these errors were encountered: