Refactor authentification and authorization
- Linguagem predominante
- TypeScript
- Estrelas
- 0
- Forks
- 0
- Merge médio
- 7d 3h
- PRs com merge (30d)
- 2
Descrição
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
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.