Skip to content
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

Add option to specify steam guard code via command line options #405

Open
dumbasPL opened this issue Mar 31, 2023 · 10 comments
Open

Add option to specify steam guard code via command line options #405

dumbasPL opened this issue Mar 31, 2023 · 10 comments

Comments

@dumbasPL
Copy link

This would allow for a full "non-interactive" mode when used on steam accounts with mobile steam guard.

@yaakov-h
Copy link
Member

yaakov-h commented Apr 1, 2023

With the new authentication system (coming soon to DD) you should be able to approve Steam Guard via the mobile app, without needing to actually enter a code.

@dumbasPL
Copy link
Author

dumbasPL commented Apr 1, 2023

approve Steam Guard via the mobile app

That's not my point. I have a shared secret, I can generate a code from that secret. I'm interested in full automation (no humans involved). And no, saving the "password" is not always a viable option for me. So being able to generate a code that's like 5 seconds ahead and pass it directly as an argument would allow for that pretty nicely.

@yaakov-h
Copy link
Member

yaakov-h commented Apr 2, 2023

Can you elaborate as to what your full use-case is?

With the recent changes to Steam authentication, I don't know if or for how much longer supplying your own external Guard code in advance will work.

@dumbasPL
Copy link
Author

dumbasPL commented Apr 2, 2023

Can you elaborate as to what your full use-case is?

I want to be able to Download and analyze game updates as they come out. The account I have the games on has (well had, disabled it for now) steam guard. I have dumped the shared secret and I'm able to generate steam guard codes for it without actually using the app. I want to have a way where I can pre-calculate the guard code using an external tool (all you need for that is the secret and current time) and supply it as an argument/env variable so that the app uses it instead of asking me for one (the same way the password input is done).

With the recent changes to Steam authentication, I don't know if or for how much longer supplying your own external Guard code in advance will work.

Pretty sure it will. I don't think the codes are going away any time soon. The only thing that changes is the API they are passed on to. The official steam client always has an option to "Use a code instead". The new API still supports codes just fine. Many people like me don't even have the official steam app installed and just use external tools so please don't restrict the new steam authentication to the "approve in-app" mode only, codes still work and are supported afaik.

@yaakov-h
Copy link
Member

yaakov-h commented Apr 2, 2023

I'll need to look over the integration code that xPaw put together but I think it should be doable with a custom IAuthenticator.

@icewind1991
Copy link

piping the TOTP code into the command seems to work for accounts that don't have the mobile app setup.

Would still be nice to have an option for accounts that do have the mobile app setup.

@murlakatamenka
Copy link

Can you elaborate as to what your full use-case is?

I can.

I am comfortable with my Linux terminal and supplying Steam Guard code from another CLI like depotdownloader... -2fa "$(steamguard)" is waaay easier than doing any phone shenanigans.

It'll be a truly automated solution to download depots, without user interaction. That's what @dumbasPL was saying earlier.


The last version that supported entering Steam Guard (although in interactive manner) is 2.5.0

@xPaw
Copy link
Member

xPaw commented Aug 31, 2024

Why don't you use -remember-password?

@murlakatamenka
Copy link

I do, but eventually the stored login session expires (doesn't it?) and then we're at the same "I don't wanna pull my phone to enter 2FA when I can just use my lovely shell to do that for me".

The session won't expire in case of frequent usage, but that's not always the case.

@xPaw
Copy link
Member

xPaw commented Aug 31, 2024

Make an issue if it doesn't renew tokens, because it should before the token expires. (still implies you'd have to be running DD for it to renew)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants