teddiebui / AromatherapyWebApp

0 stars 0 forks source link

Refactor Authentication Service #8

Closed teddiebui closed 2 months ago

teddiebui commented 2 months ago

Problem arises


Further review & research shows that currently built Authentication Service was trying to be in a stateless manner using JWT, which introduces dangerous security issues.

Issues with JWT Authentication (aka stateless Authentication)


Taking Action


With this insights, this Issue is elevated to ask for a refactoring or rebuid this Authenticaion Service to be stateful, so that our application can be top-most secured.

Task breakdown


1. Remodel Service to issue Refresh Token & Access Token when authenticated successfuly
2. Remodel Database Schema to store Refresh Token with "is_revoked" column to track the revocation
3. Preventing re-authentication on same device & facilitate one-session-a-time when login on other devices
4. ..to be continue

As a starting firegun, i will try gradually to finish the tasks.. will update later.