Skip to content

Commit f875a8f

Browse files
committed
Check that expires_in is explicitly not None, can be 0
1 parent 31c1cd6 commit f875a8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcp/client/auth/oauth2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ async def _initialize(self) -> None: # pragma: no cover
468468
self.context.current_tokens = await self.context.storage.get_tokens()
469469
self.context.client_info = await self.context.storage.get_client_info()
470470

471-
if self.context.current_tokens and self.context.current_tokens.expires_in:
471+
if self.context.current_tokens and self.context.current_tokens.expires_in is not None:
472472
self.context.update_token_expiry(self.context.current_tokens)
473473

474474
self._initialized = True

0 commit comments

Comments
 (0)