Skip to content

feat: optional password + Authenticator number-match login#548

Open
VishuThePlayer wants to merge 1 commit into
TheNetsky:v4from
VishuThePlayer:feat/optional-password-passwordless-login
Open

feat: optional password + Authenticator number-match login#548
VishuThePlayer wants to merge 1 commit into
TheNetsky:v4from
VishuThePlayer:feat/optional-password-passwordless-login

Conversation

@VishuThePlayer

Copy link
Copy Markdown

Summary

  • Make ACCOUNT_N_PASSWORD optional so accounts can sign in via Microsoft Authenticator number-match, email code, or TOTP without storing a password.
  • Fix login state handling so "Send notification" / number-match flows wait for phone approval instead of prompting for a typed 6-digit OTP.
  • Exclude .env / config/ from Docker images and clarify Docker entrypoint messaging for optional passwords.
  • Relax Node engines to >=22 for broader local compatibility (Docker still uses Node 24).

Test plan

  • npm run build succeeds
  • npm run lint (0 errors)
  • Docker image builds (microsoft-rewards-script:local)
  • Container loads accounts with empty password (no missing-password crash)
  • Local run reaches Authenticator number-match and waits for phone approval
  • Maintainer verifies on a passwordless Microsoft account end-to-end

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 TheNetsky left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still needs some testing however these things will have to be edited/changed first.

Comment thread package.json
"license": "GPL-3.0-or-later",
"engines": {
"node": ">=24.0.0"
"node": ">=22.0.0"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .dockerignore
accounts.main.json
config.json
.env
.env.*

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread env.example
# - Microsoft Authenticator approval (passwordless / number match)
# - Email code (prompted in the terminal)
# - TOTP authenticator (set ACCOUNT_1_TOTP_SECRET)
#ACCOUNT_1_PASSWORD=

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

2 participants