Skip to content

Commit

Permalink
Use newer version of firebase/php-jwt library
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Aug 20, 2023
1 parent 155a593 commit b0c32a2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Changelog
* Bugfix: Catch also the `TransportExceptionInterface` in `AbstractResourceOwner::getResponseContent()` method,
* Bugfix: Current matched Firewall is respected during generation of resource owner check path links,
* Bugfix: Prevent fatal error in `OAuthUserProvider::loadUserByOAuthUserResponse()` when `nickname` is not available in OAuth response,
* Bugfix: Use newer version of `firebase/php-jwt` library,
* Chore: Removed not used Symfony Templating component

## 2.0.0-BETA2 (2022-01-16)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"phpstan/phpstan": "^1.2",
"phpstan/phpstan-symfony": "^1.0",
"phpstan/extension-installer": "^1.1",
"firebase/php-jwt": "^5.5"
"firebase/php-jwt": "^6.8"
},

"config": {
Expand Down
4 changes: 2 additions & 2 deletions src/OAuth/ResourceOwner/AppleResourceOwner.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ private function getClientSecret(): string
throw new \RuntimeException('PHP-JWT library is required to use automatic "client_secret" generation. Please try "composer require firebase/php-jwt".');
}

$playload = [
$payload = [
'iss' => $this->options['team_id'],
'iat' => time(),
'exp' => time() + 600,
'aud' => 'https://appleid.apple.com',
'sub' => $this->options['client_id'],
];

return JWT::encode($playload, $this->options['auth_key'], 'ES256', $this->options['key_id']);
return JWT::encode($payload, $this->options['auth_key'], 'ES256', $this->options['key_id']);
}
}

0 comments on commit b0c32a2

Please sign in to comment.