This example demonstrates the usage of Fingerprint inside the Next.js pages directory (classic approach). For an example using the app directory, see ../next-appDir.
In order to try out this example:
- Create a
.env(or.env.local) file in this directory. - Set the
NEXT_PUBLIC_FPJS_PUBLIC_API_KEYenvironment variable to the value of your Fingerprint Public API key.
To get the API key:
- Go to Fingerprint Dashboard > API Keys and find it there.
- If you don't have a Fingerprint account, sign up for free.
From the repository root, install dependencies and build the SDK:
pnpm install
pnpm buildAfter setting the API key, start the example:
pnpm --filter next-example devRuns the app in the development mode.
Open http://localhost:3002 to view it in the browser.