Closed jwillemsen closed 7 months ago
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (auth
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
auth documentation auth source (message by IssueLinks)
We update the config entry with the new token data, including a possibly included refresh token, on each refresh.
Ok, sorry, missed that completely, will dive into this again, thanks for your fast response
The problem
Daikin is migrating their API to a new OAuth2 setup, but with each refresh_token they send a new refresh_token that has to be used with the next request. When looking at the OAuth2 source code this doesn't seem to be handled as possible use case.
The OAuth2 documentation mentions that on a token refresh a new refresh_token can be issued, see https://www.oauth.com/oauth2-servers/access-tokens/refreshing-access-tokens
The Daikin docu is below, the code I think should handle this is https://github.com/home-assistant/core/blob/5d0d3a5c2b7a18ab4303e36e7f9104c8082a87b8/homeassistant/components/auth/__init__.py#L338
What version of Home Assistant Core has the issue?
core-2024.2.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
auth
Link to integration documentation on our website
https://developers.home-assistant.io/docs/auth_api/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response