https://github.com/rickh94/t3passkey
Passkey authentication on the t3 stack using turso and upstash
https://github.com/rickh94/t3passkey
authentication drizzle libsql next-auth nextjs passkey t3-stack trpc turso webauthn
Last synced: 12 months ago
JSON representation
Passkey authentication on the t3 stack using turso and upstash
- Host: GitHub
- URL: https://github.com/rickh94/t3passkey
- Owner: rickh94
- License: mit
- Created: 2023-10-17T06:24:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-09T14:35:40.000Z (over 2 years ago)
- Last Synced: 2023-11-09T15:37:26.248Z (over 2 years ago)
- Topics: authentication, drizzle, libsql, next-auth, nextjs, passkey, t3-stack, trpc, turso, webauthn
- Language: TypeScript
- Homepage: https://t3passkey.rickhenry.dev
- Size: 426 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# T3 App Template with passkeys
This is a [T3 Stack](https://create.t3.gg/) project bootstrapped with `create-t3-app`.
I’ve hacked on Passkey/FIDO2/WebAuthn authentication.
## Passkeys + NextAuth
I’m using a Next Auth Credential provider to authenticate the passkey
credentials. This depends on [simplewebauthn](https://simplewebauthn.dev/). It
has the email provider as a fallback, but you could use something else.
## JWT Sessions
NextAuth does not allow you to use Database sessions with the
CredentialProvider, as far as I can tell. This is not well documented. It simply
fails silently if you do. So I’ve added configuration to use a JWT session and
get the user ID from the JWT.
## Turso
I’m using [Turso](https://turso.tech/). For the database, largely because of
their extremely generous free tier, but you can just swap it out for whatever
making the appropriate changes to the prisma configuration.