Changes to permissions (such as creating a mission or a community) currently require the user to manually refresh their JWT or relog since the client-side permissions are not updated automatically (a user can thus theoretically edit a mission in the backend, but the frontend hides the required elements).
The client currently already checks every response for an optional token payload value, replacing the current JWT with a new one if provided. Thus, the backend would only need to regenerate the user's JWT and return in the with new content details after creation.
Tasks
[x] Adapt required schemas to allow for JWTs to be provided if required
[x] Regenerate JWT on endpoints that change user permissions
[x] Provide new JWT on endpoints that change user permissions
Changes to permissions (such as creating a mission or a community) currently require the user to manually refresh their JWT or relog since the client-side permissions are not updated automatically (a user can thus theoretically edit a mission in the backend, but the frontend hides the required elements).
The client currently already checks every response for an optional
token
payload value, replacing the current JWT with a new one if provided. Thus, the backend would only need to regenerate the user's JWT and return in the with new content details after creation.Tasks