diff --git a/authlib/oauth2/rfc7523/token.py b/authlib/oauth2/rfc7523/token.py index 27fab5f4..e598d73b 100644 --- a/authlib/oauth2/rfc7523/token.py +++ b/authlib/oauth2/rfc7523/token.py @@ -73,7 +73,7 @@ def generate(self, grant_type, client, user=None, scope=None, expires_in=None): :param scope: current requested scope. :return: Token dict """ - if not expires_in: + if expires_in is None: expires_in = self.DEFAULT_EXPIRES_IN token_data = self.get_token_data(grant_type, client, expires_in, user, scope)