SocialConnect/auth

iat (Issued At) claim is not valid

agungsugiarto opened this issue · 1 comments

Issue

iat (Issued At) claim is not valid. How i do to increase $screw from JWT class ?

VENDORPATH\socialconnect\jwx\src\JWT.php at line 222

215             if (!is_numeric($this->payload['iat'])) {
216                 throw new InvalidJWT(
217                     'iat (Issued At) must be numeric'
218                 );
219             }
220 
221             if ($this->payload['iat'] > ($now + self::$screw)) {
222                 throw new InvalidJWT(
223                     'iat (Issued At) claim is not valid ' . date(DateTime::RFC3339, (int) $this->payload['iat'])
224                 );
225             }
226         }
227 
228         /**
229          * @link https://tools.ietf.org/html/rfc7519#section-4.1.4

My env

PHP: 7.2

Library:

  • "socialconnect/auth": "^3.2"
  • "socialconnect/http-client": "^1.0"

Provider: google

Provider options:

[
   'options' => [
                'auth.parameters' => [
                    'hd' => 'domain.tld',
                ]
            ]
];

Thanks 😺

$screw is a static public property. You can directly overwrite its value.

\SocialConnect\JWX\JWT::$screw = 4;