Add platform type validation for refresh token #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now we don't validate this part of refresh token.
That may have issues.
For example, if user accidentally pass
EAuthTokenPlatformType.WebBrowser
forLoginSession
constructor, then provide refresh token from Client and then callgetWebCookies()
- SteamSession will think that provided token is really SteamWeb token and tries to get cookies from web-endpoints, in result refresh token will be canceled by Steam backend (#22).Better will be updating platform type, instead of throwing error, but it will cause updating transport, which defining in constructor and you may not want to change this.
If you will accept this PR, i suggest to bump version to 1.3.0, because throwing error here may contain breaking changes for some projects.