Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mielecloud] Fix OAuth service handle #18264

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jlaur
Copy link
Contributor

@jlaur jlaur commented Feb 13, 2025

This changes the OAuth service handle from the configured e-mail address to the bridge UID in order to avoid conflicts in the global namespace of handles in the OAuth storage.

Automated migration is not supported by the core classes, therefore the logic is as follows:

  • If the new service handle is found, it will be used.
  • Otherwise, if an old service handle is found, it will be used, and the user will be advised to re-authorize (through logging).
  • On successful re-authorization, any old service handle will be removed from the OAuth storage.

Additionally a clickable link will now be provided when authorization is missing.

Fixes #14783
Fixes #18265

@jlaur jlaur added the bug An unexpected problem or unintended behavior of an add-on label Feb 13, 2025
@jlaur jlaur requested a review from BjoernLange as a code owner February 13, 2025 21:20
@jlaur jlaur force-pushed the 14783-mielecloud-oauth branch from c3c4d27 to e1a5c34 Compare February 13, 2025 22:45
Fixes openhab#14783
Fixes openhab#18265

Signed-off-by: Jacob Laursen <[email protected]>
@jlaur jlaur force-pushed the 14783-mielecloud-oauth branch from e1a5c34 to 8b0a335 Compare February 13, 2025 22:52
@jlaur jlaur requested a review from lolodomo February 14, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
1 participant