myriadeinc / web

0 stars 2 forks source link

[web] Stay signed in for 1 hour #73

Closed jonxuxu closed 4 years ago

jonxuxu commented 4 years ago
Ticket Title
fixes #23 [web] Stay signed in for an hour

Description

Co-related to https://github.com/myriadeinc/diamond/pull/13

Allows users to stay signed in for an hour.

Implementation / Approach

In diamond/src/services/token.service.js, the service generates the UNIX time of 1 hour ahead of the present time, * 1000. (bug outlined in https://github.com/myriadeinc/diamond/issues/14).

In web/src/client/layers/AuthLayer.jsx, the component checks if the current time is ahead of the JWT token's expiry value.