Closed bidi47 closed 2 years ago
no need to modify config they just release 2.4.1 with reverting BC break and allowing array structures for private keys, rather than just string
https://github.com/mezzio/mezzio-authentication-oauth2/pull/48
Recomandation: specific require in composer.json mezzio/mezzio-authentication-oauth2 ^2.4.1
after a recent update to an api i got an error detailed below if didn't find if this was covered in previous issues we should also consider updating file config/autoload/local.php.dist in the api basecode
the error
TypeError raised in file \api\vendor\mezzio\mezzio-authentication-oauth2\src\ConfigTrait.php line 24: Message: Return value of Mezzio\Authentication\OAuth2\AuthorizationServerFactory::getPrivateKey() must be of the type string, array returned
it's caused by the getPrivateKey() function in mezzio/mezzio-authentication-oauth2 version 2.4.0 that now explicitly requires the return of a string
the fix is to update our config/autoload/local.php from
'private_key' => [ 'key_or_path' => getcwd() . '/data/oauth/private.key', 'key_permissions_check' => false ],
to'private_key' => file_get_contents(getcwd() . '/data/oauth/private.key'),