We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91c7550 commit 5eae72eCopy full SHA for 5eae72e
firebase/auth/__init__.py
@@ -563,5 +563,18 @@ def _load_client_secret(secret):
563
564
565
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
578
user['expiresAt'] = math.floor(datetime.datetime.today().timestamp() + int(user.get('expiresIn')) - 60)
579
580
return user
0 commit comments