From e24dff2723322d8ca09c78992c16d2d1353cbeb7 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sun, 10 Apr 2016 14:30:44 +0100 Subject: [PATCH] Fixed expires_in --- src/Grant/ImplicitGrant.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Grant/ImplicitGrant.php b/src/Grant/ImplicitGrant.php index 66100e7d..4d9f79bb 100644 --- a/src/Grant/ImplicitGrant.php +++ b/src/Grant/ImplicitGrant.php @@ -162,7 +162,7 @@ class ImplicitGrant extends AbstractAuthorizeGrant $redirectPayload['access_token'] = (string) $accessToken->convertToJWT($this->privateKey); $redirectPayload['token_type'] = 'bearer'; - $redirectPayload['expires_in'] = time() - $accessToken->getExpiryDateTime()->getTimestamp(); + $redirectPayload['expires_in'] = $accessToken->getExpiryDateTime()->getTimestamp() - (new \DateTime())->getTimestamp(); $response = new RedirectResponse(); $response->setRedirectUri(