bl3_auto_vip icon indicating copy to clipboard operation
bl3_auto_vip copied to clipboard

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

Open jjwc opened this issue 6 years ago • 3 comments

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): [email protected]
Enter password        : redacted
Setting up . . . . . success!
Logging in as '[email protected]' . . . . . failed!
Had error: Failed to start session

and

[sudo] password for username:
Enter username (email): [email protected]
Enter password        : redacted!
Setting up . . . . . success!
Logging in as '[email protected]' . . . . . 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.

jjwc avatar Oct 11 '19 07:10 jjwc

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.

supremeliter avatar Jun 24 '20 02:06 supremeliter

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 avatar Mar 26 '22 19:03 squatto

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

squatto avatar Mar 26 '22 19:03 squatto