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

feat(drizzle): adapter runnuble on the edge #10828

Closed

Conversation

ddelizia
Copy link

@ddelizia ddelizia commented May 5, 2024

☕️ Reasoning

Current version of the drizzle adapter cannot run on the edge (vercel/cloudflare/...) this is due to the usage of the node crypto library which is not available on the browser. In order to make it available on the browser, I have replaced it with https://github.com/streamich/v4-uuid

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

Authors now claims to be compatible with the edge, but current version of drizzle adapter is not: https://authjs.dev/getting-started/migrating-to-v5#edge-compatibility

📌 Resources

Copy link

vercel bot commented May 5, 2024

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

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 5, 2024 9:19pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview May 5, 2024 9:19pm

Copy link

vercel bot commented May 5, 2024

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

A member of the Team first needs to authorize it.

@github-actions github-actions bot added adapters Changes related to the core code concerning database adapters drizzle @auth/drizzle-adapter labels May 5, 2024
Copy link

socket-security bot commented May 5, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher

View full report↗︎

Copy link

socket-security bot commented May 5, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@ndom91
Copy link
Member

ndom91 commented May 6, 2024

This has been recently updated to use the globalThis crypto, so it should be runnable on the edge.

What version of next-auth and the adapter, etc. were you trying where that didn't work?

@ndom91
Copy link
Member

ndom91 commented May 19, 2024

This has been fixed in the latest @auth/drizzle-adapter@1.1.0 🙏

@ndom91 ndom91 closed this May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapters Changes related to the core code concerning database adapters drizzle @auth/drizzle-adapter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants