Skip to content

extract home ID from jwt instead of /me during auth - #150

Merged
erwindouna merged 7 commits into
erwindouna:mainfrom
karlbeecken:jwt-home-id
Mar 2, 2026
Merged

extract home ID from jwt instead of /me during auth#150
erwindouna merged 7 commits into
erwindouna:mainfrom
karlbeecken:jwt-home-id

Conversation

@karlbeecken

Copy link
Copy Markdown
Contributor

Proposed Changes

Previously, to acquire the home ID for a user during the login, the /me endpoint on my.tado.com was 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_me is 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.

Comment thread src/tadoasync/tadoasync.py
Comment thread src/tadoasync/tadoasync.py
Comment thread src/tadoasync/tadoasync.py
@wmalgadey wmalgadey added the enhancement Enhancement of the code, not introducing new features label Feb 25, 2026
Comment thread src/tadoasync/tadoasync.py
@erwindouna

Copy link
Copy Markdown
Owner

Think looks good now, thanks @karlbeecken!

@erwindouna
erwindouna merged commit ff3906e into erwindouna:main Mar 2, 2026
11 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement Enhancement of the code, not introducing new features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants