feat: optional password + Authenticator number-match login#548
feat: optional password + Authenticator number-match login#548VishuThePlayer wants to merge 1 commit into
Conversation
Make ACCOUNT_N_PASSWORD optional and correctly handle Microsoft Authenticator number-match after Send notification, instead of prompting for a typed OTP. Also keep .env out of Docker images. Co-authored-by: Cursor <cursoragent@cursor.com>
TheNetsky
left a comment
There was a problem hiding this comment.
It still needs some testing however these things will have to be edited/changed first.
| "license": "GPL-3.0-or-later", | ||
| "engines": { | ||
| "node": ">=24.0.0" | ||
| "node": ">=22.0.0" |
There was a problem hiding this comment.
Let's no switch back to 22.x, due to some changes in node this has been set to 24.x for a reason. I also don't know what this has to do with this PR.
| accounts.main.json | ||
| config.json | ||
| .env | ||
| .env.* |
There was a problem hiding this comment.
This isn't related to this PR, there's also no explanation why you're now adding these to the dockerignore file?
| } | ||
|
|
||
| /** Microsoft Authenticator number-match / approve-on-phone prompts (not email OTP). */ | ||
| export function isPasswordlessNumberMatchMessage(message: string | null | undefined): boolean { |
There was a problem hiding this comment.
Avoid language dependant selectors/regex for the login, these tend to change for the user's region. These are avoided wherever possible. See if you can find another way to detect this.
| # - Microsoft Authenticator approval (passwordless / number match) | ||
| # - Email code (prompted in the terminal) | ||
| # - TOTP authenticator (set ACCOUNT_1_TOTP_SECRET) | ||
| #ACCOUNT_1_PASSWORD= |
There was a problem hiding this comment.
Definitely do no comment out password, since it's by far the most used login method. You can just leave it as in and blank for those who don't use it. Having it say optional is fine however.
Summary
ACCOUNT_N_PASSWORDoptional so accounts can sign in via Microsoft Authenticator number-match, email code, or TOTP without storing a password..env/config/from Docker images and clarify Docker entrypoint messaging for optional passwords.>=22for broader local compatibility (Docker still uses Node 24).Test plan
npm run buildsucceedsnpm run lint(0 errors)microsoft-rewards-script:local)