Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prsima mysql template for multiple providers #12521

Closed
wants to merge 1 commit into from

Conversation

bog1200
Copy link

@bog1200 bog1200 commented Jan 19, 2025

☕️ Reasoning

Removed @unique constraint on Account.userId on Prisma MySQL documentation, because it blocks logging in if using multiple providers for the same user

[auth][error] AdapterError: Read more at https://errors.authjs.dev#adaptererror
[auth][cause]: PrismaClientKnownRequestError:
Invalid (data)=>p.account.create() invocation in
..\mpp.next\server\chunks\node_modules_c98574._.js:4245:40

4242 id
4243 }
4244 }),
→ 4245 linkAccount: (data)=>p.account.create(
Unique constraint failed on the constraint: Account_userId_key
at $n.handleRequestError (..\mpp\node_modules@prisma\client\runtime\library.js:121:7315)
at $n.handleAndLogRequestError (..\mpp\node_modules@prisma\client\runtime\library.js:121:6623)
at $n.request (..\mpp\node_modules@prisma\client\runtime\library.js:121:6307)
at async l (..\mpp\node_modules@prisma\client\runtime\library.js:130:9633)
at async acc. (..\mpp.next\server\chunks\node_modules_@auth_core_e8985c..js:1364:24)
at async handleLoginOrRegister (..\mpp.next\server\chunks\node_modules
@auth_core_e8985c..js:2945:9)
at async Module.callback (..\mpp.next\server\chunks\node_modules
@auth_core_e8985c..js:3820:50)
at async AuthInternal (..\mpp.next\server\chunks\node_modules
@auth_core_e8985c..js:4859:24)
at async Auth (..\mpp.next\server\chunks\node_modules
@auth_core_e8985c._.js:5120:34)
at async AppRouteRouteModule.do (..\mpp\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:10:33313)
at async AppRouteRouteModule.handle (..\mpp\node_modules\next\dist\compiled\next-server\app-route.runtime.dev.js:10:40382)
at async doRender (..\mpp\node_modules\next\dist\server\base-server.js:1455:42)
at async responseGenerator (..\mpp\node_modules\next\dist\server\base-server.js:1814:28)
at async DevServer.renderToResponseWithComponentsImpl (..\mpp\node_modules\next\dist\server\base-server.js:1824:28)
at async DevServer.renderPageComponent (..\mpp\node_modules\next\dist\server\base-server.js:2240:24)
at async DevServer.renderToResponseImpl (..\mpp\node_modules\next\dist\server\base-server.js:2278:32)
at async DevServer.pipeImpl (..\mpp\node_modules\next\dist\server\base-server.js:960:25)
at async NextNodeServer.handleCatchallRenderRequest (..\mpp\node_modules\next\dist\server\next-server.js:281:17)
at async DevServer.handleRequestImpl (..\mpp\node_modules\next\dist\server\base-server.js:853:17)
at async ..\mpp\node_modules\next\dist\server\dev\next-dev-server.js:373:20
at async Span.traceAsyncFn (..\mpp\node_modules\next\dist\trace\trace.js:153:20)
at async DevServer.handleRequest (..\mpp\node_modules\next\dist\server\dev\next-dev-server.js:370:24)
at async invokeRender (..\mpp\node_modules\next\dist\server\lib\router-server.js:183:21)
at async handleRequest (..\mpp\node_modules\next\dist\server\lib\router-server.js:360:24)
at async requestHandlerImpl (..\mpp\node_modules\next\dist\server\lib\router-server.js:384:13)
at async Server.requestListener (..\mpp\node_modules\next\dist\server\lib\start-server.js:142:13)

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

📌 Resources

Copy link

vercel bot commented Jan 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ❌ Failed (Inspect) Jan 19, 2025 0:10am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Jan 19, 2025 0:10am

Copy link

vercel bot commented Jan 19, 2025

@bog1200 is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants