mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Remove duplicate oauth2 token validity check (#128419)
* remove duplicate validity check * Apply suggestions from code review * add leftover --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
committed by
GitHub
parent
8ae8fa7ec9
commit
144454b8c3
@@ -49,7 +49,6 @@ class AsyncConfigEntryAuth(my_pypi_package.AbstractAuth):
|
||||
|
||||
async def async_get_access_token(self) -> str:
|
||||
"""Return a valid access token."""
|
||||
if not self._oauth_session.valid_token:
|
||||
await self._oauth_session.async_ensure_token_valid()
|
||||
await self._oauth_session.async_ensure_token_valid()
|
||||
|
||||
return self._oauth_session.token["access_token"]
|
||||
|
||||
Reference in New Issue
Block a user