Replies: 71 comments 107 replies
-
:) |
Beta Was this translation helpful? Give feedback.
-
Well, we're not doing Web Requests, but that's the basic principal. And yeah, digging through the documentation is not fun. My idea is to basically steal whatever we can. So i'm using SteamKit as my basis. You'll probably want to clone SteamKit https://github.com/SteamRE/SteamKit so you can see what they do. Same for ValvePython, as we are basically redoing everything they already do, except probably worse. |
Beta Was this translation helpful? Give feedback.
-
OAuth2 is a fairly common authentication workflow. I know how it works, but don't really implement it ever. We basically need to port everything in https://github.com/SteamRE/SteamKit/tree/master/SteamKit2/SteamKit2/Steam/Authentication to python. Fortunately a good portion is simple OOP classes, but the Task stuff will be a bit more work. One thing that might give us a challenge is they use polling to check and see if the authentication went through. We do have multiple threads but i'm not sure which would do the polling on. |
Beta Was this translation helpful? Give feedback.
-
Ok, I'll take a look, but in the evening probably. |
Beta Was this translation helpful? Give feedback.
-
sounds good. A quick note on how SteamKit does it: |
Beta Was this translation helpful? Give feedback.
-
What's weird is we use a website (index.html) to get your user and password, but for the life of me i can't figure out how it sends that to steam. I don't see anywhere in that web form where we call steam's API with our user and password. unless it's all via the code-behind and that's a glorified enter user and password page. As i'm typing this, i'm begining to think that's the case. Hoo, boy, that's hacky af. |
Beta Was this translation helpful? Give feedback.
-
In our code, it looks like we can change |
Beta Was this translation helpful? Give feedback.
-
I really wish SteamKit's wiki was finished. RIP. Regardless, their authentication example is relatively straightforward. https://github.com/SteamRE/SteamKit/tree/master/Samples/1a.Authentication They perform the login via those two calls, then actually use the client login message we're already using. Which is great, because it means a lot of our code doesn't need to change. basically, all we need to do is make 2 calls before we call client login. |
Beta Was this translation helpful? Give feedback.
-
I'm going to rebase to your repo so i can actually commit changes. If i have permissions i can just push it to a branch on your repo, or i can fork it and do a PR. Mine has mixed Tabs and Spaces so it's a mess anyway. I am really not a fan of Python forcing soft tabs on everyone. A bracket is literally one character and is infinitely less error-prone I'm looking at the code, and since I've never gotten to the login with token option (we don't have the token, that's been our whole problem), i have no idea if that will still work but i think it will and we can leave it alone. |
Beta Was this translation helpful? Give feedback.
-
We're going to need RSA for the password. I've found rsa and crpytodome. I'm guessing your python-fu is stronger than mine, so if you have a preference either way, let me know. https://stackoverflow.com/questions/30056762/rsa-encryption-and-decryption-in-python shows how to do it with cryptodome, potentially, and https://www.section.io/engineering-education/rsa-encryption-and-decryption-in-python/ uses regular rsa. Also, GOG requires us deploy any third-party python modules we use alongside the plugin. Since we're adding a RSA module, we'll need to do it The instructions are here https://github.com/gogcom/galaxy-integrations-python-api#deploy-structure-example. It's gibberish to me, because i almost never work with python. lmk if it makes sense to you, if not, we'll deal with it later. I'm going to log off for the night, and try to get the RSA and other two calls we need implemented tomorrow morning. Also, apparently Achievement Sync is broken if you want to take a look for it. Not the top priority but mentioned on the main issue page |
Beta Was this translation helpful? Give feedback.
-
Oh, you are not going to believe what i had to do to track down the Retrieve RSA Public Key call to Steam's server. There's no dedicated EMsg for it, and SteamKit's code is a question wrapped in an enigma. The Tl;Dr: version: they do a LOT of meta programming. I can walk you through it to see if another set of eyes caught any mistakes i may have made, but I'm guessing you'd rather not. Regardless, I think i have it, but i haven't tested it. I'd need to include the RSA module in GoG Galaxy as i noted in previous post, but haven't figured it out yet. Does ValvePython retrieve that RSA Key anywhere? I didn't look too hard but if it does i can steal that code or confirm what i have will work. I'm going to push what i have right now, so you can look at what i've been doing. I have no idea if it will compile, but afaik it should. I'm not pushing my python environment, but you'll need to install rsa if you want to t Honestly, it might be easier to test this stuff in a dedicated python environment with all the GOG Galaxy stuff stripped out. A simple command line style thing that sees if we can get the 3 messages we need to work, then integrate back in. If i'm really lucky, the Auth methods we'll need for the Polling Authentication function are in EMsg, but i'm not expecting that. I'm hoping it will at least be the same as the Retrieve RSA Key call so i can reuse that. |
Beta Was this translation helpful? Give feedback.
-
Created a new project that strips out all (or nearly all) of the GOG Galaxy integration so i can just worry about getting the auth working. It'll make debuggin significantly easier. once it's done i can copypaste the code into the corresponding files in the regular project. https://github.com/ABaumher/IntegrationMinimal |
Beta Was this translation helpful? Give feedback.
-
I still try to figure out how do websocket work. And where is the documentation for it. This is new thing for me. I wonder why this was not implemented using Web API. If would be way easier and straightforward. I tried adopting this https://github.com/SteamRE/SteamKit/tree/master/Samples/1a.Authentication to python, but with no luck. |
Beta Was this translation helpful? Give feedback.
-
Yup, I also noticed that there is no dedicated EMsg for it, but from SteamKit I extracted that they send: I'm lost what is Valve and what is not and where is official documentation documenting |
Beta Was this translation helpful? Give feedback.
-
Oh, I guess I'm not the only one lost: |
Beta Was this translation helpful? Give feedback.
-
I focused on getting old "flow" working but with tokens. I managed to get to the point where I have to fill in SteamGuard code. |
Beta Was this translation helpful? Give feedback.
-
I don't know if i get all the data - Friends, etc. But it did sync my games I doubt i can stay logged in if i close it though |
Beta Was this translation helpful? Give feedback.
-
@slo The Achievement issue seems to be that when you get achievements in a steam, they don't update. Or, maybe it's they don't appear at all. idk. Honestly, i really need a break from this, but unfortunately, i've done a terrible job explaining what i've done and a lot of the progress is my work, so I can't just hand it off. Tears of the Kingdom is out tomorrow, i might play that for a few days, sorry, lol. |
Beta Was this translation helpful? Give feedback.
-
Currently Testing https://github.com/SteamRE/DepotDownloader/tree/auth/accesstoken. If i'm lucky, i can find out how it works when the sample on steamkit does not. Port the message to Python, and et voilà! I can freeze the repo i'm working on so you all have time to read it before 17 other things change (which makes it hard to understand, sorry y'all), and then step back while the testers find bugs we need to fix. |
Beta Was this translation helpful? Give feedback.
-
Afk rn, but i think there's also an asyncio wait_for which you can specify
"all" for that'd work as well.
I think we want those jobs because they give us some information on the
games that we used before.
I want to refactor the whole thing lol. The new protos have rpc options you
can get with grpcio, which should let us simplify some calls but we're on
an extremely old protoc
…On Fri, May 12, 2023, 8:34 AM don-de-marco ***@***.***> wrote:
yap, the job list thing is a bit hacky indeed. But after I uncommented the
code it seemed to work and I didn't really think about it much more. There
are other places in the code that I'd want to direct at my refactoring
attempts first.
I don't think one needs to loop over awaitables. There is
asyncio.as_completed which returns awaitables as there are results.
https://docs.python.org/3/library/asyncio-task.html#asyncio.as_completed
—
Reply to this email directly, view it on GitHub
<#164 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASX2DPBERW7OMJGWW3AKEITXFYU4JANCNFSM6AAAAAAXQILGPE>
.
You are receiving this because you were mentioned.Message ID:
<FriendsOfGalaxy/galaxy-integration-steam/repo-discussions/164/comments/5884591
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
So here's where i'm at. We go through the whole new auth flow as follows:
That all works. To log in again, we should just be able to
I do not know why. I cannot figure out why. Apparently this works at DepotDownloader (linked above) but i can't replicate it. At this point, i will pay someone to figure it out for me, i don't even care. Hell, if you can figure out depot downloader well enough for me to know what i need to input on it to test the login token stuff, i will pay you for that (you need to use In the meantime, i'm going to play Zelda. Feel free to ask any questions about how the code works; i'll see the stuff on my email and respond here. i'm intimately familiar with pretty much all of the code structure by now. it's not how i'd have designed it but it's what was there and i'm just going with it |
Beta Was this translation helpful? Give feedback.
-
We looked into it. Unfortunately they're in the same boat. The dev there
expects the new auth flow to be up by the end of the month, hopefully
…On Sat, May 13, 2023, 2:20 AM Quang Kieu ***@***.***> wrote:
I just do some search. I wonder if this lib good to use? If it fit then
you might not need to redo the work https://github.com/ValvePython/steam
—
Reply to this email directly, view it on GitHub
<#164 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ASX2DPBOOBVMLNNO3REL3RLXF4R33ANCNFSM6AAAAAAXQILGPE>
.
You are receiving this because you were mentioned.Message ID:
<FriendsOfGalaxy/galaxy-integration-steam/repo-discussions/164/comments/5890394
@github.com>
|
Beta Was this translation helpful? Give feedback.
-
Because it frustrates me, i'm back. Still mostly doing Zelda, but not as much as i'd like. I'm in the process of stripping out all the depot-related stuff in https://github.com/SteamRE/DepotDownloader/tree/auth/accesstoken, which apparently works with the new auth and remembers logins. I'm in the process of stripping it down so all it does is log in, and then store the login info. If it works like they say, i can see what the hell magic they are doing and reverse-engineer it (basically, just record their messages and then send the same stuff). I'm guessing they have a In the interim, the latest auth_fix branch hasn't changed in a good while, and can be used for testing. At this point, you'll have to log in every time you boot up gog but the sync stuff should work. |
Beta Was this translation helpful? Give feedback.
-
Anyone here, can you get the latest branch at authfix and try it out? I just remained connected on a restart and want to make sure it's not a fluke before i let everyone on the main issue board know |
Beta Was this translation helpful? Give feedback.
-
In order to push the stuff to Nebula, i've rebased my development branch to their fork. I am now actively developing at |
Beta Was this translation helpful? Give feedback.
-
@don-de-marco do you think we could write a tool that could strip out the duplicates from either common.proto and common_base.proto or steammessages_base.proto? Would it even be worth it? |
Beta Was this translation helpful? Give feedback.
-
man alive, it is good to have this thing mostly done. I really do appreciate all the help as well |
Beta Was this translation helpful? Give feedback.
-
Removing public profiles also slims down our package includes, which makes our plugin smaller. That's helpful. Hopefully i can simplify the install process even more. @woj1993 provided a nice powershell script that automates the various commands necesary to go from installing python 3.7.9 to installing the plugin with just one command. There's some minor tweaks i need to make, but hopefully i can get a shell script up shortly for our MacOS users. |
Beta Was this translation helpful? Give feedback.
-
@don-de-marco @slo I updated the app.txt to remove the stuff from public profiles. It does cause an issue with user_profile.py, but that seems to be unused, so i removed it and all references to it as well. I don't see any other references to these removed modules, but i could use another set of eyes. lmk if you catch any other references that are now missing |
Beta Was this translation helpful? Give feedback.
-
At this point, we're basically done, minus some bugfixes and QoL changes. If anyone here can figure out pytest so i don't have to and fix all the shit we broke, that'd be amazing. |
Beta Was this translation helpful? Give feedback.
-
This is a place for us to bounce ideas and code stuff to fix #159.
Beta Was this translation helpful? Give feedback.
All reactions