Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iat (Issued At) claim is not valid #138

Open
agungsugiarto opened this issue Oct 21, 2020 · 1 comment
Open

iat (Issued At) claim is not valid #138

agungsugiarto opened this issue Oct 21, 2020 · 1 comment

Comments

@agungsugiarto
Copy link

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 😺

@fawaztahir
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants