一覧へ戻る
hunainhyder/next-auth-jose-zod(新しいタブで開きます)
主要言語: TypeScript
Next.js 13 Authentication system using JSON Web Tokens
- star 数
- 1
- watcher 数
- 1
- fork 数
- 2
- issue 数
- 0
- 最終更新
- 2023/08/28
主要言語: TypeScript
Next.js 13 Authentication system using JSON Web Tokens
Next.js 13 Authentication system using JSON Web Tokens
Libraries used
How to run
First clone the repo or download code then open the folder in ternimal.
Then run the following commands
npm i -g pnpm
pnpm i
npx prisma migrate dev --name init
After running these commands your authentication api will be ready to use
Use this command to run the api
pnpm run dev
Testing the API
You can test this API in postman
pnpm run dev command/api/auth/register endpoint and send new user registeration data in request body using POST method./api/auth/login endpoint and send user data to login in request body using POST method./api/users/me endpoint to get current logged in user details using GET method./api/auth/logout endpoint to logout using GET method.