Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.12 KB

File metadata and controls

34 lines (23 loc) · 1.12 KB

This example demonstrates the usage of Fingerprint inside Next.js's app directory approach.
Note how you can use Fingerprint inside a React Server Component without issues as it is correctly executed in the browser only. See ../next for an example using the classic pages approach.

Setting up

Fingerprint Public API key

In order to try out this example:

  1. Create a .env (or .env.local) file in this directory.
  2. Set the NEXT_PUBLIC_FPJS_PUBLIC_API_KEY environment variable to the value of your Fingerprint Public API key.

To get the API key:

Installing dependencies

From the repository root, install dependencies and build the SDK:

pnpm install
pnpm build

After setting the API key, start the example:

pnpm --filter next-appDir dev

Runs the app in the development mode.
Open http://localhost:3003 to view it in the browser.