-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Login with cookie #422
Comments
Unfortunately this solution doesn't work. |
Maybe I can log in not directly with refresh token, but with cookies, which I will get with steam-session module for node js from DoctorMcKay. But I would like to know which cookie dict I should give. |
SteamClient supports login_cookies parameter, that allows login by cookies |
I'm experiencing the same problem, login with cookies method works fine, but the session dies after 24 hours and you have to login again. It creates another device in the list of authorized devices and if you are unlucky as me, you will get your account locked when you'll try to make_offer_with_url method (steam says it suspects account was stolen, lol) |
My problem is that i want to login with cookie but i don't know how cookie dict should look like. i would be very grateful if you show an example of cookie dict. I understand that if i login using steamid, shared_secret, identity_secret and then save cookie and login with cookie in future, it will work. But i don't want to use shared_secret and identity_secret. |
My cookies dict looks like this {"sessionid": "xxxxxxxxxxx", "steamCountry": "xxxxxxxxxxx", "steamLoginSecure": "xxxxxxxxxxxx", "steamRefresh_steam": "xxxxxxxxxxxxxx"} The problem is that they last only 24 hours. |
As far as I know a session for 24 hours is refreshed with refresh_token, and you can refresh it in the module for node.js I mentioned above or you can refresh it manually :D |
I don't know about adding a new device, nor do I know what's wrong with it or how to avoid it. I think that's how steam works. |
And you got those dictionary cookies just from your browser? |
Yes, I've already read about node. js, maybe we can implement their solution here in Python |
No, you can get your cookies after you login with client.login method and then obtain your cookies with client._session.cookies.get_dict("steamcommunity") method |
But I don't want to use shared_secret and identity_secret for login. I would like to log in immediately with a cookie. |
I don't know exactly how the update works. But I do know that this module works very well and I suggest you to look at its code. |
You can login without shared_secret as I said, I meant if you want to obtain cookies you will have to use shared_secret. |
I'm running to try it! :D |
I wish you a good luck. |
Thanks for the tip, I thought I had to confirm, but I only need to buy items ;D |
If someone can implement refresh cookie method, I will gladly merge it and release new version. |
Unfortunately I get an error of this format when I use my cookies from my browser:
I used the code from the example in the documentation:
|
I have seen a similar error discussed in issues github, but haven't found a solution. Maybe I'm using the wrong cookie format? |
Are you sure you use cookies from correct account? |
steamid is absolutely accurate. As I understand it steamLoginSecure consists of steamid + access_token |
I load my cookies as a json file and it works. The problem is in your code I guess. And make sure you use cookies from steamcommunity, not the steam.powered |
You're right, I fixed that error, but when I buy a buy item, an error pops up that says I must use the login method. Am I correct that cookie login does not support buying items? |
I've seen an implementation of buying items where the person only gives a refresh_token. How did you implement it... :D |
I use Steampy only to accept and to send trades, I didn't work with buying items xD |
The documentation says exactly that I should use the .login() method before purchasing. Can you please tell me if this is possible or not? @bukson |
Does logging in via cookies work?
If so, what should the cookie data look like?
My goal is to log into an account with only a refresh token. Thanks for any information :D
The text was updated successfully, but these errors were encountered: