Jump to content
McKay Development

RefreshToken vs loginKey vs password

Recommended Posts

Hi, what is the best method for relogin to bot if e.g. on NoConnection disconnect.

1st step login with steam-sessions and save refreshToken
2nd step login to steam-client with refreshToken and save loginKey
3rd step if NoConnection disconnect use login key or refreshToken

and how long alive refreshToken and how to regenerate ? only relogin w/ steam-session, if steam-client throw InvalidPassword

Link to comment
Share on other sites

  • 2 months later...

No, web cookies are shorter-lived than that. But you can always get new cookies if you still have a valid refresh token. For example:

let session = new LoginSession(EAuthTokenPlatformType.WebBrowser);
session.refreshToken = getMyRefreshTokenFromDatabaseOrWhatever();
let cookies = await session.getWebCookies();


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...