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 support for new Steam authentication #401

Merged
merged 5 commits into from
Jun 2, 2023
Merged

Add support for new Steam authentication #401

merged 5 commits into from
Jun 2, 2023

Conversation

yaakov-h
Copy link
Member

No description provided.

@xPaw
Copy link
Member

xPaw commented Mar 23, 2023

Can probably drop SentryFileHash/accepting machine auth with this.

@yaakov-h yaakov-h linked an issue Apr 2, 2023 that may be closed by this pull request
@xPaw xPaw closed this May 3, 2023
@xPaw xPaw deleted the auth/accesstoken branch May 3, 2023 19:54
@xPaw xPaw restored the auth/accesstoken branch May 3, 2023 19:54
@xPaw xPaw reopened this May 3, 2023
@yaakov-h yaakov-h marked this pull request as ready for review May 5, 2023 03:18
@yaakov-h
Copy link
Member Author

yaakov-h commented May 5, 2023

I haven't had a chance to go over it with a fine-toothed comb but this seems to be working well enough, if it breaks then I'm happy to take bug reports as they come in.

@@ -553,14 +639,14 @@ private void LogOnCallback(SteamUser.LoggedOnCallback loggedOn)
{
var isSteamGuard = loggedOn.Result == EResult.AccountLogonDenied;
var is2FA = loggedOn.Result == EResult.AccountLoginDeniedNeedTwoFactor;
var isLoginKey = ContentDownloader.Config.RememberPassword && logonDetails.LoginKey != null && loggedOn.Result == EResult.InvalidPassword;
var isAccessToken = ContentDownloader.Config.RememberPassword && logonDetails.AccessToken != null && loggedOn.Result == EResult.InvalidPassword; // TODO: Get EResult for bad access token
Copy link
Member

@xPaw xPaw May 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codes I've seen are InvalidSignature and AccessDenied.

InvalidPassword probably happens when sending password in logon.

@ABaumher
Copy link

ABaumher commented May 13, 2023

I probably don't belong here, but while i was testing your code, i noticed a minor error at

Console.WriteLine("Got Machine Auth: {0} {1} {2} {3}", machineAuth.FileName, machineAuth.Offset, machineAuth.BytesToWrite, machineAuth.Data.Length, hash);

You provide 5 arguments to string.format via Console.WriteLine, the formatted string only has 4. Can be fixed by adding {4}.
Console.WriteLine("Got Machine Auth: {0} {1} {2} {3} {4}", machineAuth.FileName, machineAuth.Offset, machineAuth.BytesToWrite, machineAuth.Data.Length, hash);

Edit: clarified ConsoleWriteline, not string.format

@xPaw xPaw merged commit 9aaed77 into master Jun 2, 2023
@xPaw xPaw deleted the auth/accesstoken branch June 2, 2023 08:18
@xPaw
Copy link
Member

xPaw commented Jun 2, 2023

@ABaumher fixed that in 0e8b662.

I merged this PR so it can be tested by users, and improvements can be made in further PRs.

@GoTeamScotch
Copy link

Just to clarify, does this allow the use of -remember-password (referenced by #397)?

Trying out v2.5.0 tonight and I seem to be getting multiple Steam Guard verification code requests.

Example:

DepotDownloader.exe -app 223100 -depot 223101 -username GoTeamScotch -remember-password
DepotDownloader.exe -app 223100 -depot 223102 -username GoTeamScotch

leads to multiple requests for the account password, then a subsequent Steam Guard code via email.

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

Successfully merging this pull request may close these issues.

DepotDownloader not remembering password (despite -remember-password)
4 participants