Skip to content

Commit a922a27

Browse files
author
devnick
committed
php-jwt algorithm support
Added support for allowing the JWT algorithm to be passed into Auth0's decode method, which is now required by php-jwt
1 parent 9b23617 commit a922a27

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Auth0/Login/Auth0Service.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ public function callOnLogin($auth0User) {
6060
}
6161

6262
private $apiuser;
63-
public function decodeJWT($encUser) {
63+
public function decodeJWT($encUser, $jwtArray = []) {
6464

6565
$secret = Config::get('auth0::api.secret');
6666
$canDecode = false;
6767

6868
try {
6969
// Decode the user
70-
$this->apiuser = \JWT::decode($encUser, base64_decode(strtr($secret, '-_', '+/')) );
70+
$this->apiuser = \JWT::decode($encUser, base64_decode(strtr($secret, '-_', '+/')), $jwtArray);
7171
// validate that this JWT was made for us
7272
if ($this->apiuser->aud == Config::get('auth0::api.audience')) {
7373
$canDecode = true;

0 commit comments

Comments
 (0)