Refactor authentification and authorization
- Lingua principale
- TypeScript
- Stelle
- 0
- Fork
- 0
- Merge medio
- 7g 3h
- PR unite (30g)
- 2
Descrizione
After the user is logged in, all the assigned roles of the user are storage in the browser's sessionStorage and only checked on the client-side. This is bad practice. Anyone who has a user account is able to manipulate the sessionStorage and add/remove roles freely. Or they can send a REST request to any endpoint. As long as they have a valid token, they can completely bypass the current auth management. Furthermore, whenever the token lifetime runs out, the user won't be logged off automatically, but has to send a request to a REST endpoint (e.g. register a patient) before being forwarded to the log in mask.
TODO:
- Remove storing of permissions/roles in sessionStorage
- add checks to every secure endpoint
- add visible timer for token lifetime
- refresh token lifetime after mouse movement
- automatically forward user to login mask after token lifetime runs out
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.