1
0
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:
Dean Herbert 2017-05-11 19:27:02 +09:00
parent 18b7c8e783
commit 7d221802a2

View File

@ -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],