claabs / epicgames-freegames-node

Automatically login and find available free games the Epic Games Store. Sends you a prepopulated checkout link so you can complete the checkout after logging in. Supports multiple accounts, login sessions, and scheduled runs.
https://hub.docker.com/r/charlocharlie/epicgames-freegames
MIT License
1.33k stars 89 forks source link

Checkout URL redirects to store home page #353

Closed claabs closed 1 year ago

claabs commented 1 year ago
          After logging in successfully, and confirming I have a `device-auths.json` file, I get a notification URL to purchase. However when I click on it, I'm redirected to the store front page.

Originally posted by @sam1310 in https://github.com/claabs/epicgames-freegames-node/issues/348#issuecomment-1593768500

claabs commented 1 year ago

Can you share the URL you received in the notification? It doesn't contain any private information. Also, were you already logged in on the device?

The intent with the URL is it takes you to the login page (and prompt a login if you're not already), then redirect you to the checkout page.

sam1310 commented 1 year ago

Yep so I first successfully logged into the store to generate the device-auths.json token, I then got the purchase notification which gave me this URL :

https://www.epicgames.com/id/login?noHostRedirect=true&redirectUrl=https%253A%252F%252Fwww.epicgames.com%252Fstore%252Fpurchase%253FhighlightColor%253D0078f2%2526offers%253D1-f5d9b93771214e4cbd60506539d1cfc6-825a2a7eb70b458ab5b3cd9f5b3fa014%2526offers%253D1-277e364d24ec43069f4ee3c4414d5096-f7aa0e57c2b94acd97a28a7ec99a7ded%2526orderId%2526purchaseToken%2526showNavigation%253Dtrue&client_id=875a3b57d3a640a6b7f9b4e883463ab4

I was then redirected to https://store.epicgames.com/en-US and was still logged in with my account.

claabs commented 1 year ago

Oh, I see. It's double URL-encoding the percent signs. What notification method was this sent through?

sam1310 commented 1 year ago

Ah nice one, I missed that! Notification method is Telegram

marcfusch commented 1 year ago

Same here, when I go to check the url on my docker interface, the link is working. But with Telegram, it redirects to the store page and not the checkout one.

claabs commented 1 year ago

Sorry, I was a dummy and pushed the fix to the wrong branch.