TheNetsky / Microsoft-Rewards-Script

Automated Microsoft Rewards script, using TypeScript, Cheerio and Playwright.
189 stars 44 forks source link

login using login.live.com issue with possible solution #16

Closed Guido30 closed 10 months ago

Guido30 commented 11 months ago

Hello

Apparently microsoft likes to block access to account.microsoft.com, occasionally when using this script my ip gets blocked from accessing that url, after a few days when my dynamic ip changes it works again, i've also tried using a proxy and vpn to confirm wheter or not the domain was actually down and it works, i just get blocked.

So the weird thing is that every other microsoft domain works, so trying to login from rewards.bing.com/Signin works, but since this script uses the login.live.com which redirects to account.microsoft.com it hangs and stops working.

I've modified 2 lines of code to try to login from rewards.bing.com/Signin instead

inside Login.ts at line 23

await page.goto('https://rewards.bing.com/Signin')
const isLoggedIn = await page.waitForSelector('html[data-role-name="RewardsPortal"]', { timeout: 10_000 }).then(() => true).catch(() => false)

the changes are

  1. the url where to login
  2. the selector, from html[data-role-name="MeePortal"] to html[data-role-name="RewardsPortal"]

Now even when restricted the login works when using this script

TheNetsky commented 11 months ago

Interesting, I've not had this issue, last tested today, But I'll make the change.

TheNetsky commented 11 months ago

This will be added in the next update, which will be in some days.

TheNetsky commented 10 months ago

Added in 1.3.0