quer/the-steam-awards

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

quer opened this issue · 7 comments

quer commented

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:
JustArchiNET/ArchiSteamFarm@d571cd9?diff=unified

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

you might read more here:
JustArchiNET/ArchiSteamFarm#3043

Check how is working "steam-session" package

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

quer commented

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

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

quer commented

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 commented

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 commented

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