An Upcoming open-source coding platform on GitHub for collaborative problem-solving, featuring a user-friendly interface, real-time code collaboration, detailed analytics, and a vibrant community. Empowering coders of all levels to learn, contribute, and grow together.
4
stars
4
forks
source link
Feature : Create a Login and Logout API based on OAuth #3
Create Login API
Request Format
Response Format
Name the Router
authRouter
Create this
authRoutes.ts
in the./src/Routes/
Folder, If the folder is not present create it yourself.Create an Interface for the Request and Response to ensure type-checking.
Use
validator
to Validate the Email and Password Criteria.Response should have an appropriate message.
Handle all Errors and Edge cases for the Given API.
OAuth Task
jsonwebtoken
and will be based onsessionCount + email
of the user.token -> userId
anduserId -> token
.86400s
i.e. 24 Hours.Create Logout API
Request Format
Response Format
OAuth Task
Testing