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): webauthn support #10297

Merged
merged 26 commits into from May 19, 2024

Conversation

JipSterk
Copy link
Contributor

☕️ Reasoning

🧢 Checklist

  • Documentation
  • Tests
  • Ready to be merged

🎫 Affected issues

📌 Resources

@JipSterk JipSterk requested a review from ndom91 as a code owner March 12, 2024 22:08
Copy link

vercel bot commented Mar 12, 2024

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

Name Status Preview Comments Updated (UTC)
auth-docs ❌ Failed (Inspect) May 19, 2024 10:43am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview May 19, 2024 10:43am

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

vercel bot commented Mar 12, 2024

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

A member of the Team first needs to authorize it.

@ndom91
Copy link
Member

ndom91 commented Mar 13, 2024

@JipSterk thanks for reopening this!

Could you also add some tests for this new model?? See the adapter-prisma Authenticator tests for an example 🙏

@JipSterk JipSterk force-pushed the drizzle-adapter-webauthn-support branch from ee83187 to 8ae92ee Compare March 14, 2024 19:02
@JipSterk JipSterk changed the title Drizzle adapter webauthn support feat(drizzle) adapter webauthn support Mar 18, 2024
@JipSterk JipSterk changed the title feat(drizzle) adapter webauthn support feat(drizzle) webauthn support Mar 18, 2024
@JipSterk
Copy link
Contributor Author

hi @ndom91, could you run the test & verify pipelines to ensure if the code i've written is any good? i couldn't get the test running locally.
And would like to close the pr since i would like to integrate WebAuthn in my application using a drizzle adapter

@JipSterk JipSterk force-pushed the drizzle-adapter-webauthn-support branch from 2728050 to a64b7d4 Compare April 3, 2024 09:31
@github-actions github-actions bot added providers core Refers to `@auth/core` firebase @auth/firebase-adapter prisma @auth/prisma-adapter dynamodb @auth/dynamodb-adapter fauna @auth/fauna-adapter mikro-orm @auth/mikro-orm-adapter dgraph @auth/dgraph-adapter mongodb @auth/mongodb-adapter neo4j @auth/neo4j-adapter pouchdb @auth/pouchdb-adapter sequelize @auth/sequelize-adapter upstash-redis @auth/upstash-redis-adapter labels Apr 3, 2024
@ndom91
Copy link
Member

ndom91 commented May 13, 2024

@JipSterk it looks like the getAccount method was missing from the 3 DB types and the updateAuthenticatorCounter method is supposed to throw, which it wasn't (even with the return await .. syntax that was there previously 🤔)

So I've updated those two issues in all 3 db files (sqlite.ts, pg.ts, mysql.ts). I also cleaned up a few of the unnecessary return await .. statements.

Hope thats okay!|

Tests should be passing now, the docs are updated. Looks pretty good to me!

@JipSterk
Copy link
Contributor Author

@ndom91 Thanks for your review/update any help it has to ship this feature out te happier i would be :) i thought of adding an entry to https://authjs.dev/getting-started/authentication/webauthn for drizzle, perhaps after that as well as all the tests clearing do you feel like we could ship it out? I’m eager to use it in my projects!

@ndom91
Copy link
Member

ndom91 commented May 15, 2024

@ndom91 Thanks for your review/update any help it has to ship this feature out te happier i would be :) i thought of adding an entry to authjs.dev/getting-started/authentication/webauthn for drizzle, perhaps after that as well as all the tests clearing do you feel like we could ship it out? I’m eager to use it in my projects!

Yeah we'll have to reoganise that and somehow show which frameworks / clients and which database adapters support WebAuthn / Passkeys better

But yeah if you don't see any other issues here, neither do I!

@ndom91
Copy link
Member

ndom91 commented May 17, 2024

Hmm something seems to be breaking the E2E playwright tests here (GHA) 🤔

It's using the /apps/dev/nextjs app and playwright traces can be downloaded here.

But (1) that dev app isn't touched here and (2) the dev app isn't using drizzle in any way. So I'm a bit confused as to whats going on there.. It says that there's a configuration error 🤔

@ndom91
Copy link
Member

ndom91 commented May 19, 2024

Decided to take a closer look and it definitely passes for me locally, so I think this is good to go!

image

@ndom91 ndom91 merged commit 83dc8bd into nextauthjs:main May 19, 2024
12 of 15 checks passed
@JipSterk
Copy link
Contributor Author

Thanks @ndom91 for resolving & merging this!

@JipSterk JipSterk deleted the drizzle-adapter-webauthn-support branch May 23, 2024 20:27
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

3 participants