the-steam-awards icon indicating copy to clipboard operation
the-steam-awards copied to clipboard

Modules do not work, as steam change login flow. so web cookies do not work!..

Open quer opened this issue 2 years ago • 7 comments

so steam change the login flow. So currently, the hole project, do not work!

Im looking into it. ASF have solved it. i do see how, But it done here: https://github.com/JustArchiNET/ArchiSteamFarm/commit/d571cd9580f6ac1f2cdb43b96af1e33430801bc8?diff=unified

If you have any knowledge on this. do take contact to me!.

you might read more here: https://github.com/JustArchiNET/ArchiSteamFarm/issues/3043

quer avatar Oct 19 '23 20:10 quer

Check how is working "steam-session" package

HenkerX64 avatar Oct 19 '23 20:10 HenkerX64

I checked our solution from this summer sale and it works fine. @SENPAY98K, probably can help you

HenkerX64 avatar Oct 19 '23 20:10 HenkerX64

Hey! So that do still work? then i will have a look, how it setup

quer avatar Oct 19 '23 20:10 quer

hmm, I am not sure now, I tested only login from last refresh token

HenkerX64 avatar Oct 19 '23 20:10 HenkerX64

The way i get the session/cookies to day, is when you are login to steam the socket, it provie a "key" ( webapi_authenticate_user_nonce ) , that can be used to sign direct into steam.

i am reading into the "steam-session", That is just working as you sing into the phone, and get the cookies like that. Im not toral sure, but im look into it.

if you are using it , can i get you to conferm that the cookies work.

quer avatar Oct 19 '23 21:10 quer

I have found a solution for the new login flow. Im working on adding it to the core of this project.

so it shoud be added to day, or tomorrow.

quer avatar Oct 23 '23 11:10 quer

It almost ready, But do not work fully yet. No sure why. i have a proof of concept, that work as it shoud.

Rest is just the proof of concept. to ensure i don't lose it:

var webCookies = []; 
webCookies.push("sessionid=xxxxxxxxx");
webCookies.push("steamLoginSecure=xxxxxxxxx");

const request = require('request');
var defaultTimeout = 30000;
var requestWrapper1 = request.defaults({
    timeout: defaultTimeout
});
var jar = request.jar();
var request2 = requestWrapper1.defaults({jar: jar});
webCookies.forEach(cookie => {
    jar.setCookie(request.cookie(cookie), "https://store.steampowered.com");
    jar.setCookie(request.cookie(cookie), "https://steamcommunity.com");
    jar.setCookie(request.cookie(cookie), "https://checkout.steampowered.com");
});
JoinGroup("https://steamcommunity.com/groups/156as8464w3").then(function () {
    console.log("done!");
})
function JoinGroup(groupUrl) {
    return new Promise(function (resolve, reject) {
        request2.post({
            url: groupUrl,
            form:{
                sessionID: sessionID,
                action: "join"
            },
            json: true
        }, function (error, response, body) {
            if(error){
                reject(error);
                return
            }
            resolve();
        });
    })
}

the above will join the group, but i have tryed to mirror it in the project. by: https://github.com/quer/the-steam-awards/blob/70-modules-do-not-work-as-steam-change-login-flow-so-web-cookies-do-not-work/lib/request.js#L23C19-L23C19 then in the test module, just call the post direct, like in the example https://github.com/quer/the-steam-awards/blob/70-modules-do-not-work-as-steam-change-login-flow-so-web-cookies-do-not-work/modules/testing/test.js#L14C28-L14C28

quer avatar Oct 23 '23 21:10 quer