Add MFA by email: optional IMAP code retrieval, preserve console prompt#175
Open
joyjit wants to merge 1 commit intotronikos:mainfrom
Open
Add MFA by email: optional IMAP code retrieval, preserve console prompt#175joyjit wants to merge 1 commit intotronikos:mainfrom
joyjit wants to merge 1 commit intotronikos:mainfrom
Conversation
joyjit
commented
Feb 24, 2026
- Add opower.email_mfa module: ImapMfaCodeSource (poll inbox for 6-digit code), ConsoleMfaCodeSource, RestApiMfaCodeSource, MfaCodeSource protocol.
- CLI: --mfa_imap_host, --mfa_imap_user, --mfa_imap_password, --mfa_imap_port. When set, auto-select Email option and read code from IMAP; otherwise prompt for MFA option and code (original behavior).
- No new dependencies (stdlib imaplib + existing aiohttp).
- Works with PG&E and Exelon (any utility offering Email MFA option).
Owner
|
Can you fix pre-commit? |
- opower.email_mfa: ImapMfaCodeSource, ConsoleMfaCodeSource, MfaCodeSource protocol - CLI: --mfa_imap_host, --mfa_imap_user, --mfa_imap_password, --mfa_imap_port - When set, auto-select Email and read code from inbox; else prompt (original behavior) - Refactor: _handle_mfa_challenge() to satisfy C901; fix E501, B904, ruff in email_mfa Co-authored-by: Cursor <cursoragent@cursor.com> Made-with: Cursor
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.