Index: pkg/oauth2/lib/src/credentials.dart |
diff --git a/pkg/oauth2/lib/src/credentials.dart b/pkg/oauth2/lib/src/credentials.dart |
index 26112c63a50a08f0ca75147bd6532af9ae632d4e..acc5690256e733c1e2584f6fb4d42b9b4b6879c0 100644 |
--- a/pkg/oauth2/lib/src/credentials.dart |
+++ b/pkg/oauth2/lib/src/credentials.dart |
@@ -50,7 +50,8 @@ class Credentials { |
/// credentials will expire shortly after this is called. However, since the |
/// client's expiration date is kept a few seconds earlier than the server's, |
/// there should be enough leeway to rely on this. |
- bool get isExpired => expiration != null && new DateTime.now() > expiration; |
+ bool get isExpired => expiration != null && |
+ new DateTime.now().isAfter(expiration); |
/// Whether it's possible to refresh these credentials. |
bool get canRefresh => refreshToken != null && tokenEndpoint != null; |