Skip to content

OpenIDConnectClientException: Unable to determine state  #8

@Jeremiah-Roise

Description

@Jeremiah-Roise

Hi I'm trying to test this out with keycloak as the provider and running this application with the php development server php -S 8000 -t index.php, the front page loads successfully and when I click authorize it redirects me to the keycloak login page I can successfully login but when I am redirected back the application throws and error and closes.
Here is my config.php.

<?php

// index.php interface configuration
$title = "Generate Tokens";
$img = "https://clickhelp.co/images/feeds/blog/2016.05/keys.jpg";
$scopeInfo = "This service requires the following permissions for your account:";
// Client configuration
$issuer = "http://localhost:1234/auth/realms/testing";
$clientId = "testing";
$clientSecret = "Y36ox283sqBwcf7trVVXBgYgUV5AylB8";  // comment if you are using PKCE
// $pkceCodeChallengeMethod = "S256";   // uncomment to use PKCE
$redirectUrl = "http://localhost:8000/auth.php";
// add scopes as keys and a friendly message of the scope as value
$scopesDefine = array(
//    'openid' => 'log in using your identity',
    'email' => 'read your email address',
    'profile' => 'read your basic profile info',
);
// refreshtoken.php interface configuration
$refreshTokenNote = "NOTE: New refresh tokens expire in 12 months.";
$accessTokenNote = "NOTE: New access tokens expire in 1 hour.";
$manageTokenNote = "You can manage your refresh tokens in the following link: ";
$manageTokens = $issuer . "manage/user/services";
$sessionName = "oidc-client";
$sessionLifetime = 60 * 60;  // must be equal to access token validation time in seconds
$allowIntrospection = false;

$enableActiveTokensTable = false;

and here is my keycloak .wellknown
openid-configuration.txt

Is this issue just because I am using the php development server or have I misconfigured something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions