extract home ID from jwt instead of /me during auth#150
Merged
erwindouna merged 7 commits intoerwindouna:mainfrom Mar 2, 2026
Merged
extract home ID from jwt instead of /me during auth#150erwindouna merged 7 commits intoerwindouna:mainfrom
/me during auth#150erwindouna merged 7 commits intoerwindouna:mainfrom
Conversation
erwindouna
requested changes
Feb 24, 2026
erwindouna
requested changes
Feb 24, 2026
wmalgadey
reviewed
Feb 25, 2026
wmalgadey
approved these changes
Mar 1, 2026
Owner
|
Think looks good now, thanks @karlbeecken! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Previously, to acquire the home ID for a user during the login, the
/meendpoint onmy.tado.comwas used.While this is generally fine, it adds a hard dependency of the auth flow on the availability of
my.tado.com, which might be unavailable due to rate limiting. This leads to auth failing if a rate limit is currently in place.This PR changes that, so that the auth flow extracts the home ID from the auth_token JWT (which also includes that), making the auth flow only dependent on
auth.tado.com.Optionally, we could keep a fallback, so that when the extraction fails, the old
get_meis used again to acquire the home ID. I left this out for now, as I don't think it is likely tado will suddenly change the JWTs, and it would add additional branching.