Handle Stale access token for Gmail and update the startup schema repair. Style the kanban for darkmode better

This commit is contained in:
cesnimda
2026-03-21 20:24:53 +01:00
parent 2b0e86f0ac
commit 5e50a8fed7
3 changed files with 18 additions and 8 deletions
+9 -1
View File
@@ -228,7 +228,15 @@ public sealed class GmailOAuthService : IGmailOAuthService
connection.AccessTokenExpiresAt is { } expiresAt &&
expiresAt > DateTimeOffset.UtcNow.AddMinutes(1))
{
return _protector.Unprotect(connection.EncryptedAccessToken);
try
{
return _protector.Unprotect(connection.EncryptedAccessToken);
}
catch (CryptographicException)
{
connection.EncryptedAccessToken = null;
connection.AccessTokenExpiresAt = null;
}
}
string refreshToken;