mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Convert Toon expires_in value to float (#37716)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
cd3e045e06
commit
4aaf7c5432
@ -132,4 +132,8 @@ class ToonLocalOAuth2Implementation(config_entry_oauth2_flow.LocalOAuth2Implemen
|
|||||||
|
|
||||||
resp = await session.post(self.token_url, data=data, headers=headers)
|
resp = await session.post(self.token_url, data=data, headers=headers)
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
return cast(dict, await resp.json())
|
resp_json = cast(dict, await resp.json())
|
||||||
|
# The Toon API returns "expires_in" as a string for some tenants.
|
||||||
|
# This is not according to OAuth specifications.
|
||||||
|
resp_json["expires_in"] = float(resp_json["expires_in"])
|
||||||
|
return resp_json
|
||||||
|
Loading…
x
Reference in New Issue
Block a user