RubyOffTheRailsTAMU / PhD-Application-Review-System

0 stars 0 forks source link

todo add automatically log out when JWT token is expired #204

Open XRFXRF opened 9 months ago

XRFXRF commented 9 months ago

When the JWT token is expired, the user cannot get access to the API in the database system. So the user should log in again to renew the JWT token.

Now, we will return a message to notify the user to log in again, but it is better to automatically log out for the user, and let the user log in again.

Note: It is not good to automatically generate a new JWT token for the user when the previous one is expired, because that will make the session has the token forever, which makes JWT authorization meaningless.