Replies: 2 comments 7 replies
-
Token scopes are a little different than user permissions. They can be used in a couple of ways. If you have both an app and an API, you might want to have a different set of permissions on the API than your users would get as the use the web app on a daily basis. These would be the scopes. If you look at GitHub's Personal Access Token scopes that will give you an idea of one way to organize them. This would also allow a person - or your app - to provide different limits to the user when using your API than they would get using the web app. If you were doing an SPA you might not need much in the way of scopes and just rely on the user permissions. You could, if you really wanted to, use the user permissions as the scopes and either duplicate the permissions in both the user permissions and the token scopes for consistency, though that's not a setup I would recommend. |
Beta Was this translation helpful? Give feedback.
-
That would be something for @kenjis to answer. I haven't explored JWT with Shield yet. Sorry. |
Beta Was this translation helpful? Give feedback.
-
I read when generate token with scope but default is *
But I think $user->tokenCan and $user->can have little confuse about permission on application flow
By default, user with token can do everything right?
Beta Was this translation helpful? Give feedback.
All reactions