mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:42:54 +08:00
Fix refresh tokens not working correctly
Turns out there's plenty of slashes in refresh tokens.
This commit is contained in:
parent
18b7c8e783
commit
7d221802a2
@ -41,13 +41,13 @@ namespace osu.Game.Online.API
|
||||
[JsonProperty(@"refresh_token")]
|
||||
public string RefreshToken;
|
||||
|
||||
public override string ToString() => $@"{AccessToken}/{AccessTokenExpiry.ToString(NumberFormatInfo.InvariantInfo)}/{RefreshToken}";
|
||||
public override string ToString() => $@"{AccessToken}|{AccessTokenExpiry.ToString(NumberFormatInfo.InvariantInfo)}|{RefreshToken}";
|
||||
|
||||
public static OAuthToken Parse(string value)
|
||||
{
|
||||
try
|
||||
{
|
||||
string[] parts = value.Split('/');
|
||||
string[] parts = value.Split('|');
|
||||
return new OAuthToken
|
||||
{
|
||||
AccessToken = parts[0],
|
||||
|
Loading…
Reference in New Issue
Block a user