matt1484 / bl3_auto_vip

Borderlands3 Auto VIP/Shift Code Redemption System
Apache License 2.0
81 stars 19 forks source link

unable to login - "had error: failed to start session" #28

Open jjwc opened 4 years ago

jjwc commented 4 years ago

I have just reset my password on borderlands.com and have tested the .exe on win10 and the docker version on my linux box. Both of them give the following:

Enter username (email): firstname@surname.id.au
Enter password        : redacted
Setting up . . . . . success!
Logging in as 'firstname@surname.id.au' . . . . . failed!
Had error: Failed to start session

and

[sudo] password for username:
Enter username (email): firstname@surname.id.au
Enter password        : redacted!
Setting up . . . . . success!
Logging in as 'firstname@surname.id.au' . . . . . failed!
Had error: Failed to start session

I suspect it's possibly to do with the email address domain - I've lost count of the number of sites that think .id.au isn't valid!

The password is definitely correct, and I can definitely login to the website using Chrome with the credentials.

supremeliter commented 4 years ago

Don't have a solution but wanted to verify mine isn't working either. Months in my crontab and didn't notice it until now.

        if loginRes.StatusCode != 200 {
                return errors.New("Failed to login")
        }

        if loginRes.Header.Get(client.Config.LoginRedirectHeader) == "" {
                return errors.New("Failed to start session")
        }

There's the block that's erroring out. It's getting past the login and I'm guessing it's missing that header.

According to config.json: "loginRedirectHeader": "X-CT-REDIRECT"

Now here's where I start getting into things I don't understand. I found the GET authenticate request in Chrome and I found X-CT-REDIRECT in only one place: access-control-expose-headers: Content-Type,X-SESSION-SET,X-SESSION-UNSET,X-CT-REDIRECT,X-CT-REDIRECT-ACTION

There is no header named that and I don't see any redirect on that page. The next line tries to GET that URL so it needs to be there: sessionRes, err := client.Get(loginRes.Header.Get(client.Config.LoginRedirectHeader))

Looks like the technique by 2k was changed and if I'm right this means a lot of code here will have to be updated. Or possibly just adding a line to actually expose that header, which I don't know how to do.

squatto commented 2 years ago

I fixed this in #43. The change is extremely simple to make. You can view the commit here: https://github.com/matt1484/bl3_auto_vip/commit/9d10f6c155428a586e137c65287a91f1d7894063?diff=split

squatto commented 2 years ago

This project has been forked and updated to work with the latest auth as well as with Wonderlands codes: jauderho/bl3auto