File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ def generate_confirmation_token(email: str) -> str:
2424 return serializer .dumps (email , salt = SECURITY_SALT )
2525
2626
27- def confirm_token (token : str , expiration : int = 1296000 ) -> str :
28- """Returns status of confirmation used for validation."""
27+ def confirm_token (token : str , expiration : int = 604800 ) -> str :
28+ """Returns status of confirmation used for validation (default: 7 days) ."""
2929 try :
3030 serializer = URLSafeTimedSerializer (SECRET_APIKEY )
3131 return serializer .loads (token , salt = SECURITY_SALT , max_age = expiration )
Original file line number Diff line number Diff line change @@ -30,9 +30,13 @@ async def generate_confirmation_token(email: str) -> str:
3030 ) from e
3131
3232
33- async def confirm_token (token : str , expiration : int = 1296000 ) -> Optional [str ]:
33+ async def confirm_token (token : str , expiration : int = 604800 ) -> Optional [str ]:
3434 """
3535 Verify and decode a confirmation token.
36+
37+ Args:
38+ token: The token to verify
39+ expiration: Token expiration in seconds (default: 7 days)
3640 """
3741 try :
3842 logger .debug ("[TOKEN] Verifying token with expiration: %s" , expiration )
You can’t perform that action at this time.
0 commit comments