Skip to content

Commit 68df1f2

Browse files
author
Anatoli Kurtsevich
authored
Updated token renewal strategy to ask for a new token if the existing one expires in next 60 sec (#75)
1 parent f147e86 commit 68df1f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RelationalAI/AccessToken.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ public double ExpiresOn
5252
get => CreatedOn + _expiresIn;
5353
}
5454

55-
public bool IsExpired => new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds() >= ExpiresOn - 5; // Anticipate access token expiration by 5 seconds
55+
public bool IsExpired => new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds() >= ExpiresOn - 60; // Anticipate access token expiration by 60 seconds
5656
}
5757
}

0 commit comments

Comments
 (0)