Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md Authorization Code Flow #62

Open
mtgtnt opened this issue Feb 2, 2023 · 1 comment
Open

README.md Authorization Code Flow #62

mtgtnt opened this issue Feb 2, 2023 · 1 comment

Comments

@mtgtnt
Copy link

mtgtnt commented Feb 2, 2023

$provider = new Stevenmaguire\OAuth2\Client\Provider\Keycloak([
    'authServerUrl'         => '{keycloak-server-url}',
    'realm'                 => '{keycloak-realm}',
    'clientId'              => '{keycloak-client-id}',
    'clientSecret'          => '{keycloak-client-secret}',
    'redirectUri'           => 'https://example.com/callback-url',
    'encryptionAlgorithm'   => 'RS256',                             // optional
    'encryptionKeyPath'     => '../key.pem'                         // optional
    'encryptionKey'         => 'contents_of_key_or_certificate'     // optional
    'version'               => '20.0.1',                            // optional
]);

'version' => '20.0.1', // optional

since 18.0.0 this is required. I just spent 3 days tracking down a 'Invalid response received from Authorization Server. Expected JSON.' error when I finally found that scope:openid was not being added due to requiring this version. Since 20.0.0 it is even more important.

@repli2dev
Copy link

After upgrade to 20.0.2 I got this error despite setting this version (and having openid in the scope auth url)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants