Repository navigation
fix: Kraken E.ON email/password auth fails with 'No access token' - #3719
Merged
Merged
Conversation
… is present When both oauth_mixin.py and kraken_auth_mixin.py are available (as in the standard release), the auth init logic unconditionally preferred OAuthMixin. But OAuthMixin has no email/password support — it sets access_token=None and check_and_refresh_oauth_token() returns True without obtaining a token, causing "No access token for find-tariffs". Now prefer KrakenAuthMixin when auth_method is "email" or "api_key", falling back to OAuthMixin only for SaaS OAuth mode. Fixes #3681 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
Author
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes #3681 — E.ON users with email/password auth get "Warn: Kraken: No access token for find-tariffs" and the component fails to start.
Root cause
Both
oauth_mixin.pyandkraken_auth_mixin.pyship in the release. The auth init logic atkraken.py:134unconditionally preferred OAuthMixin when it was importable. But OAuthMixin has no email/password support — it setsaccess_token = Noneandcheck_and_refresh_oauth_token()returnsTruewithout obtaining a token (line 79:if self.auth_method != "oauth": return True).The user's token is never obtained, so every GraphQL call hits "No access token".
Fix
Prefer
KrakenAuthMixinwhenauth_methodis"email"or"api_key", falling back toOAuthMixinonly for SaaS OAuth mode. This is a 4-line change in the init logic.Test plan
kraken_authandkrakentests passrun_all --test kraken_auth --test kraken— 28/28 OK