
NestJS Authentication with JWT, PassportJs, and Prisma
DATABASE_URL="" JWT_SECRET=""
/auth/login
Method: POST
Description: Authenticates a user and returns a JWT token.
Body:
{ "email": "string", "password": "string" }
/auth/register
Method: POST
Description: Registers a new user and returns a user info.
Body:
{ "name": "string", "email": "string", "password": "string" }
/auth/profile
Method: GET
Description: Retrieves user profile information. Requires a Bearer token for authentication.
Body:
Authorization: Bearer
All kind of contributions are welcome, please feel free to submit pull requests.
The above is the detailed content of Authentication in NestJS with PassportJS and Prisma. For more information, please follow other related articles on the PHP Chinese website!
The difference between vscode and vs
Implementation method of vue online chat function
What are the file server software?
webstorm adjust font size
How to open jar files
transactionscope usage
Can Douyin short videos be restored after being deleted?
What to do if there is no cursor when clicking on the input box