-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Create an authentication controller with below-mentioned methods. (Use JWT to authorize user as it will help when the project will scale, sessions maintenance is costly).
1.For user -
login, register, getCurrentUserDetails, forgotPassword, resetPassword, roleCheck
-
For admin -
login, getCurrentAdminDetails, forgotPassword, resetPassword. -
For publisher -
login, getCurrentPublisherDetails, forgotPassword, resetPassword.
All method names are self-explanatory.
roleCheck function - this will be a middleware function to check if the routes being accessed by the user are permitted to him/her or not.
For example - admin routes can not be accessed by user.
Reactions are currently unavailable