aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core/API/DTO
diff options
context:
space:
mode:
Diffstat (limited to 'src/slskd/Core/API/DTO')
-rw-r--r--src/slskd/Core/API/DTO/TokenResponse.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/slskd/Core/API/DTO/TokenResponse.cs b/src/slskd/Core/API/DTO/TokenResponse.cs
index 85992917..47cfd335 100644
--- a/src/slskd/Core/API/DTO/TokenResponse.cs
+++ b/src/slskd/Core/API/DTO/TokenResponse.cs
@@ -49,7 +49,7 @@ namespace slskd.Core.API
/// <summary>
/// Gets the value of the Not Before claim from the Access Token.
/// </summary>
- public long NotBefore => long.Parse(JwtSecurityToken.Claims.SingleOrDefault(c => c.Type == "nbf").Value);
+ public long NotBefore => long.Parse(JwtSecurityToken.Claims.SingleOrDefault(c => c.Type == "nbf")?.Value ?? long.MaxValue.ToString());
/// <summary>
/// Gets the Access Token string.