-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
1 addition
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c3f37c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how to use SteamAuthentication?
c3f37c0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@belikr I've asked myself the same question for a different project.
What seems to work for me right now is to remember the "access token" that you get during the Steam login. I haven't had a use for that yet -- now there seems to be one.
Update: this access token has an expiration, so I dropped the "save it on login". Instead, you can use the
Authentication.GenerateAccessTokenForApp#1
service call to get an access token for your refresh token. Since they just referred Nonce users to the SteamAuthentication stuff, I presume SteamKit has builtin support for getting the access token. Else it's pretty easy -- you just call that service through whatever RPC/UnifiedMessage support they have; it only takes your SteamID and the login refresh token as parameters.Use this access token to construct the "steamLoginSecure" cookie to include on your web requests, as a string
<SteamID>||<AccessToken>
.Example:
steamLoginSecure=765611...||eyAid...
This seems to do it for me right now, but I'm still considering it to be work in progress. It seems the old CMsgClientRequestWebAPIAuthenticate* stuff is no longer needed (I stumbled onto this because CMsgClientRequestWebAPIAuthenticateUserNonce stopped giving any anwers... and I figured SteamKit has probably discovered the same since they put a lot more effort into stuff than I do). However, I'm only using it for a few things right now and haven't even tested all of these yet -- right now, I'm back to being able to claim sale stickers and read my inventory, so it's promising.