Skip to content

fix: Kraken E.ON email/password auth fails with 'No access token' - #3719

Merged
springfall2008 merged 1 commit into
mainfrom
fix/kraken-eon-email-auth
Apr 2, 2026
Merged

springfall2008 merged 1 commit into
mainfrom
fix/kraken-eon-email-auth

Conversation

@mgazza

@mgazza mgazza commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator

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.py and kraken_auth_mixin.py ship in the release. The auth init logic at kraken.py:134 unconditionally preferred OAuthMixin when it was importable. But OAuthMixin has no email/password support — it sets access_token = None and check_and_refresh_oauth_token() returns True without 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 KrakenAuthMixin when auth_method is "email" or "api_key", falling back to OAuthMixin only for SaaS OAuth mode. This is a 4-line change in the init logic.

Test plan

  • All kraken_auth and kraken tests pass
  • run_all --test kraken_auth --test kraken — 28/28 OK

… 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>
@mgazza

mgazza commented Apr 2, 2026

Copy link
Copy Markdown
Collaborator Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@springfall2008
springfall2008 merged commit b8c4bc3 into main Apr 2, 2026
1 check passed
@springfall2008
springfall2008 deleted the fix/kraken-eon-email-auth branch April 2, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kraken EON error "Warn: Kraken: No access token for find-tariffs"

2 participants