Skip to content

Commit 5eae72e

Browse files
docs: _𝙩𝙤𝙠𝙚𝙣_𝙚𝙭𝙥𝙞𝙧𝙚_𝙩𝙞𝙢𝙚 description
1 parent 91c7550 commit 5eae72e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

firebase/auth/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -563,5 +563,18 @@ def _load_client_secret(secret):
563563

564564

565565
def _token_expire_time(user):
566+
""" Adds expire time of the token in the token dictionary.
567+
568+
For safety purposes, token is set to expire after 59mins instead
569+
of an hour expiry time when received.
570+
571+
:type user: dict
572+
:param user: The token dictionary received after signing in users.
573+
574+
:return: Token dictionary with an ``expiresAt`` key.
575+
:rtype: dict
576+
"""
577+
566578
user['expiresAt'] = math.floor(datetime.datetime.today().timestamp() + int(user.get('expiresIn')) - 60)
579+
567580
return user

0 commit comments

Comments
 (0)