This repository demonstrates how to authenticate users with MetaMask in a Next.js application.
To run the project locally:
npm install
npm run dev
Method: GET Description: Generates a nonce that the user needs to sign with their MetaMask wallet.
Method: POST Description: Verifies the signed nonce to authenticate the user.
Method: GET Description: Confirms the session and returns the authenticated user's wallet address.
Method: POST Description: Destroys the current user session.