openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.9k stars 3.59k forks source link

OAuth2 client : missing calls to ungetOAuthService and deleteServiceAndAccessToken #14818

Open lolodomo opened 1 year ago

lolodomo commented 1 year ago

18 bindings use the OAuth2 client provided by the OH core framework.

Only 10 bindings are calling ungetOAuthService. It could be missing for the following bindings:

Only ecobee, mielecloud and netatmo bindings are calling deleteServiceAndAccessToken. It could be missing for the following bindings:

3 bindings are calling addAccessTokenRefreshListener but not removeAccessTokenRefreshListener:

lolodomo commented 1 year ago

@jlaur : I should update again all bindings (when necessary) because deleteServiceAndAccessToken has to be called in handleRemoval even if no OAuth service was initialized. It is necessary to remove the entries from the storage.

mhilbush commented 1 year ago

@lolodomo The ecobee binding calls deleteServiceAndAccessToken when the Ecobee cloud forces a reauthorization, but not when the thing is removed. I'll submit a PR that calls deleteServiceAndAccessToken when the thing is removed.

lolodomo commented 1 year ago

@jlaur : it is a pity, we did not update the two last ones: bticinosmarther and mielecloud.

jlaur commented 1 year ago

@jlaur : it is a pity, we did not update the two last ones: bticinosmarther and mielecloud.

Yes. For mielecloud I created #14783, but this could be done separately.

lsiepel commented 1 year ago

@lolodomo only a few bindings are left, besides time, any specific reason they are not checked/fixed yet?

lolodomo commented 1 year ago

@lolodomo only a few bindings are left, besides time, any specific reason they are not checked/fixed yet?

I suppose @jlaur and me switched to other PRs.