TheNetsky / Microsoft-Rewards-Script

Automated Microsoft Rewards script, using TypeScript, Cheerio and Playwright.
133 stars 33 forks source link

Fix login - email can be pre-filled #108

Closed bigfox closed 1 week ago

bigfox commented 2 months ago

Hello, I have prepared PR with a fix for login.

I have a problem with one of my accounts. When this account tries to log in without a saved session, it's OK. But when try to log in with the saved session, the script ends with the error same as #93.

If I delete the session, everything works OK, until the next run. It's very annoying to delete a session every run.

After some debugging, I noticed that the login email may already be prefilled.

I added the check for prefilled email. If detected, then skip filling email and go fill password.

TheNetsky commented 3 weeks ago

Is this actually a ongoing issue for anyone? Why would it autofill in a chrome instance that's basically fresh?

bigfox commented 3 weeks ago

I don't know exactly, but I think it just wants to reauthenticate the known user with a password. I haven't come up with a reason or action for it to always require it. Now it hasn't happened to me again for a few weeks ... maybe some security reasons.