ZWhitey / Steam-Auto-Queue

This script can help you finish Steam events automatically.
17 stars 3 forks source link

Login with refreshTokens #27

Open SENPAY98K opened 2 months ago

SENPAY98K commented 2 months ago

Hey, i think it is better to login with credentials at first time and save refresh tokens, after that you can use refresh tokens to generate cookies without limitation that steamcommunity has.

ZWhitey commented 2 months ago

node-steamcommunity which I used for login does not support refresh token. Maybe I need to rewrite whole login process with node-steam-session to use refresh token.

SENPAY98K commented 2 months ago

better not use steam-sessions because the cookies generated are limited to country ip, so you would rather use steam-user for its availability everywhere.

SENPAY98K commented 2 months ago

also you can add new function for login with refresh token and option to choose between, so you wont have to rewrite all bot

ZWhitey commented 2 months ago

I have added refresh token login, you can try this branch. If everything is fine, I will release new version.

SENPAY98K commented 2 months ago

Okay

SENPAY98K commented 2 months ago

I have added refresh token login, you can try this branch. If everything is fine, I will release new version.

It worked, but i noticed that 10 seconds delay which is needed only at first time logins (using account credentials). Also you could prefix log data (date - time) if you want.

SENPAY98K commented 2 months ago

I cant find anything to handle fail logins (in case token expired/changed).