From df96a7c7ccec6e4fea41abfd420eacb98aa59c79 Mon Sep 17 00:00:00 2001 From: Salah Alkhwlani Date: Sun, 5 Dec 2021 16:13:17 +0300 Subject: [PATCH] Revert "Revert "When the access_token expired the check not valid here"" (#9) --- app/Models/OauthToken.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/OauthToken.php b/app/Models/OauthToken.php index d2b1786..d18c13d 100644 --- a/app/Models/OauthToken.php +++ b/app/Models/OauthToken.php @@ -15,6 +15,6 @@ class OauthToken extends Model public function hasExpired() { - return now()->gte($this->updated_at->addSeconds($this->expires_in)); + return now()->timestamp > $this->expires_in; } }