Commit 3209af3
authored
Fix breaking change with php-jwt 6.1.0 (#311)
Hi! The latest release of php-jwt (6.1.0) breaks the oAuthJWT method.
`Forrest::authenticate(); ` throw an error:
```
TypeError
Firebase\JWT\JWT::encode(): Argument #4 ($keyId) must be of type ?string, array given, called in *****/vendor/omniphx/forrest/src/Omniphx/Forrest/Authentications/OAuthJWT.php on line 22
```
Checking these changes I see that the `alg` param is the third only and it's not necessary to pass it as fourth param (which is the KeyId param) so I removed the $header variable/param.
https://github.com/firebase/php-jwt/blob/fbb2967a3a68b07e37678c00c0cf51165051495f/src/JWT.php#L1821 parent 34d9fd4 commit 3209af3
1 file changed
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
0 commit comments