- Notifications
You must be signed in to change notification settings - Fork6
Next.js (TypeScript) repository of a sample app that offers passkey authentication.
License
corbado/example-passkeys-nextjs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation

This is a sample implementation of the Corbado React package and Corbado Node SDK being integrated into a web application built with Next.js.
Please see thefull blog post to understand the detailed steps needed to integrate passkeys into Next.js apps.
app/auth/page.tsx: the file where the React Auth component is usedapp/profile/page.tsx: displays user information if the user has successfully authenticated (rendered on the server)app/user-data/route.ts: api route that checks the users authentication state using the Corbado Node SDKapp/page.tsx: client rendered page that accesses data from the above mentioned route.env.local: add relevant environment variables that you can obtainfromCorbado developer panel
Please follow the steps inGetting started to create and configurea project in theCorbado developer panel.
You need to haveNode andnpm installed to run it.
Use the values you obtained inPrerequisites to configure the following variables inside an.env.localfile you create in the root folder of this project:
NEXT_PUBLIC_CORBADO_PROJECT_ID=<YOUR PROJECT ID>CORBADO_API_SECRET=<YOUR API SECRET>CORBADO_FRONTEND_API=<YOUR FRONTEND API>CORBADO_BACKEND_API=<YOUR BACKEND API>
Run
npm i
to install all dependencies.
Finally, you can run the project locally with
npm run dev
You can also run the project in a docker container using the provideddocker-compose.yml file.
docker-compose up --build
About
Next.js (TypeScript) repository of a sample app that offers passkey authentication.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors6
Uh oh!
There was an error while loading.Please reload this page.