app-generator / api-server-nodejs

Nodejs API Server - Express / SQLite / TypeORM | AppSeed
https://appseed.us/boilerplate-code/nodejs-starter/
Other
227 stars 87 forks source link

Evolution 3# - Authorization (Roles) #17

Open app-generator opened 1 year ago

app-generator commented 1 year ago

Hello @FullStackkDev

The authorization should link each user to a ROLE:

On successful signIN (JWT) or OAuth, the API server return also the role of the user

Thank you!

app-generator commented 1 year ago

Hello @FullStackkDev,

We need a simple mechanism (CLI is preferred) to assign an ADMIN role to an existing user.
Let me know a simple solution for this use case.

Ty!

FullStackkDev commented 1 year ago

@app-generator I have updated the step4 branch for it.

Run update-role command specified in the package.json file to assign the role. I have described briefly in the README file on how to use this command. https://github.com/app-generator/api-server-nodejs/tree/step4/support-for-react#-update-role-for-existing-user