api-server-nodejs
api-server-nodejs copied to clipboard
Evolution 3# - Authorization (Roles)
Hello @FullStackkDev
The authorization should link each user to a ROLE:
-
user
- numeric value 1 in users table -
admin
- numeric value 2 in users table
On successful signIN
(JWT) or OAuth
, the API server return also the role of the user
- during the registration (JWT, OAuth) the created user is associated with a default "USER" role
Thank you!