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
1 changed files with 5 additions and 1 deletions
|
@ -132,4 +132,8 @@ class ToonLocalOAuth2Implementation(config_entry_oauth2_flow.LocalOAuth2Implemen
|
|||
|
||||
resp = await session.post(self.token_url, data=data, headers=headers)
|
||||
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…
Add table
Reference in a new issue