4049_1572836826 Posted January 11, 2023 Report Posted January 11, 2023 Hi, what is the best method for relogin to bot if e.g. on NoConnection disconnect. e.g. 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 Quote
Dr. McKay Posted January 12, 2023 Report Posted January 12, 2023 loginKeys are irrelevant if you're using a refresh token. If you have a refresh token, always use it. A refresh token is valid for 200 days, and once it expires you'll need to login again. 4049_1572836826 1 Quote
4049_1572836826 Posted January 12, 2023 Author Report Posted January 12, 2023 Oh, Thanks for information. Quote
4049_1572836826 Posted March 23, 2023 Author Report Posted March 23, 2023 Hi, whats about getWebCookies() ? can i use / inject this cookie for 200 days ? 🙈 Quote
Dr. McKay Posted March 23, 2023 Report Posted March 23, 2023 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(); 4049_1572836826 1 Quote
4049_1572836826 Posted March 23, 2023 Author Report Posted March 23, 2023 Oh wow thanks for example. Quote
Recommended Posts
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.