A T3 example app with passkey authentication, using Hanko Passkey API
MIT License
This repository demonstrates how to add passkey login functionality to your T3 Stack application using Hanko Passkey API. Passkey authentication is a secure and user-friendly alternative to traditional password-based authentication, providing a seamless login experience for users.
For a detailed tutorial on implementing passkey login in your Solid.js app, refer to our blog post: How to add a passkey login to T3 Stack?
Before you begin, ensure you have the following:
Note: You'll need to create a Passkey Project on Hanko Cloud with the App URL
http://localhost:3000
. See our docs to learn how to setup a passkey project.
git clone https://github.com/teamhanko/t3-stack-with-passkeys.git
Set up environment variables
.env
file in the root directory and add the following environment variables:NEXTAUTH_SECRET=random-string
NEXTAUTH_URL=http://localhost:3000
GITHUB_ID=
GITHUB_SECRET_ID=
DATABASE_URL=your-db-url
PASSKEYS_API_KEY=your-hanko-passkey-api-key
NEXT_PUBLIC_PASSKEYS_TENANT_ID=your-hanko-passkey-tenant-id
your-hanko-passkey-api-key
and your-hanko-passkey-tenant-id
with your actual Hanko Passkey API key and tenant ID.Install the dependencies using your preferred package manager (e.g., npm
, pnpm
, yarn
, or bun
). For this project, we've used pnpm
:
pnpm install
pnpm dev
Start the application:
http://localhost:3000
in your web browser.Sign up with GitHub.
Register a passkey:
Log out:
Login with with a passkey
Feel free to reach out to us on Discord if you get into any issues.
This project is licensed under the MIT License.