If we are currently logged in it allows us to refresh the page and re-authenticate as long as the token is still valid. Firebase allows to be logged in for 1 hour. If we still have a valid token we should be able to get the user data and use the app. If the token is invalid the user should be logged out.
Acceptance Criteria:
When the user logs in or registers, the system saves the expiry date of the token in session storage.
When the user logs in or registers, the system save the user id in session storage.
If the current time if after the expiry date the user will get logged out.
If the current time is before the expriy date, the user will stay logged in.
If the current time is before the expiry date, the system will use the user token and user id to ge the user information from the database.
Out of Scope
No auto renew of the token is in scope of this task.
Description:
If we are currently logged in it allows us to refresh the page and re-authenticate as long as the token is still valid. Firebase allows to be logged in for 1 hour. If we still have a valid token we should be able to get the user data and use the app. If the token is invalid the user should be logged out.
Acceptance Criteria:
Out of Scope
No auto renew of the token is in scope of this task.