0
Under review

SSO : OAuth2 error: the provided state is not matching the stored one

Quentin V 3 weeks ago updated 3 weeks ago 2

Hi,

I installed FileRun (enterprise edtion) with docker (v19.03.13) with repo (https://github.com/filerun/docker) and I activated SOO OAuth2 authentication but I can't login : "OAuth2 error: the provided state is not matching the stored one!". In database, all df_oauth_.* are empty but OAuth2 plugin options are registered. So the connection is well established between FileRun and the database.

I have no more log to understand the problem. I tried with another OAuth2 client and it works. Do you have any avenues of research that I could pursue ?

Update : 

Not bdd connection

if (!empty($_GET['state']) && $_GET['state'] !== $_SESSION['oauth2state']) { 
    $this->error = 'OAuth2 error: the provided state is not matching the stored one!';
    $this->errorCode = 'OTHER';
    return false;
}

$_SESSION['oauth2state'] is empty.. why ? WIP...

Test button can't works because it dosen't set state in session


WIP...

Under review

What service/app are you connecting to via OAuth2? Is it a known one, which I can try to check against?

My authority server is node-oidc-provider (https://github.com/panva/node-oidc-provider) with koajs configuration (https://koajs.com) but you can try with keycloak i think