Skip to content

Setting up authorization and authentication. #29

@himanshusanecha

Description

@himanshusanecha

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

  1. For admin -
    login, getCurrentAdminDetails, forgotPassword, resetPassword.

  2. 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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions