-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
feat(users-permissions): add refresh and logout actions to default permissions #24877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
innerdvations
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like the right solution, but I haven't tested it!
|
Do you think we're missing a change like this too ? In So even with this change, users who are upgrading would need to go into the users permissions settings in the admin to give the public role access to the refresh endpoint. It feels like we need more sophisticated role default logic that tracks which permissions have been initialised? @innerdvations |
What does it do?
Adds missing default permissions for the
auth.refreshandauth.logoutendpoints to theDEFAULT_PERMISSIONSarray in the users-permissions plugin:auth.refresh→publicrole (allows unauthenticated token refresh)auth.logout→authenticatedrole (requires valid access token)Why is it needed?
403 Forbidden when calling
/api/auth/refresh, as it was never added toDEFAULT_PERMISSIONS. Even with a valid refresh token, because the public role had no permission to access the endpoint.How to test it?
Prerequisites:
jwtManagement: 'refresh'Test refresh endpoint (public access):
Related issue(s)/PR(s)
Fixes #24867
Fixes #24871