This is an example Next.js application with custom implemented authentication. It is based on JWT (JSON Web Tokens) using the jose lib. The token is encrypted using using HKDF (a HMAC Key derivation function) and stored in a cookie.
Install dependencies:
npm run dev
Then run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.