Skip to content

Commit

Permalink
Revert "Revert "When the access_token expired the check not valid her…
Browse files Browse the repository at this point in the history
…e"" (#9)
  • Loading branch information
salkhwlani authored Dec 5, 2021
1 parent 912e282 commit df96a7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Models/OauthToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

1 comment on commit df96a7c

@thaifanisalla
Copy link
Contributor

@thaifanisalla thaifanisalla commented on df96a7c Dec 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure ?
when i logger the value of $this->updated_at->addSeconds($this->expires_in)
it give me "2073-11-23 03:37:10"

Please sign in to comment.