rasliche / bluestar-nuxt

2 stars 2 forks source link

Improve Authentication Scheme #45

Open rasliche opened 3 years ago

rasliche commented 3 years ago

Proposal:

To better match other authentication models, change permissions from an Object structure to a simple Array.

roles: [ 'admin', 'manager:{shopId}', 'user', 'staff', 'volunteer']

A client side auth check can take place against the roles field in Nuxt/auth.

A server side auth check can take place in Express middleware.