# Kong-OIDC Plugin Configurations

**URL:** <https://discuss.konghq.com/t/kong-oidc-plugin-configurations/5581>\
**Category:** Questions\
**Created:** [February 20, 2020, 4:24am UTC](https://discuss.konghq.com/t/kong-oidc-plugin-configurations/5581 "2020-02-20T04:24:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rishi\_Anand](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/rishi_anand/32/970_2.png) [@Rishi\_Anand](https://discuss.konghq.com/u/Rishi_Anand)\
**Post date:** [February 20, 2020, 4:24am UTC](https://discuss.konghq.com/t/kong-oidc-plugin-configurations/5581/1 "2020-02-20T04:24:22Z")

</div>

I have put single page application behind Kong and trying to use OIDC plugin (https://github.com/nokia/kong-oidc) for **authorization\_code** grant flow and then call subsequent backend services (which are already behind Kong) with the token.

OIDC plugin configuration are as follows:

> “config”: {  
> “response\_type”: “code”,  
> “introspection\_endpoint”: null,  
> “timeout”: null,  
> “filters”: null,  
> “bearer\_only”: “no”,  
> “ssl\_verify”: “no”,  
> “session\_secret”: null,  
> “introspection\_endpoint\_auth\_method”: null,  
> “realm”: “kong”,  
> “redirect\_after\_logout\_uri”: “/”,  
> “scope”: “openid sam\_account”,  
> “token\_endpoint\_auth\_method”: “client\_secret\_basic”,  
> “client\_secret”: “XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX”,  
> “client\_id”: “YYYYYYYYYYYYYYYYYYYY”,  
> “logout\_path”: “/logout”,  
> “discovery”: “[https://samauth.us-east-1.sws.siemens.com/.well-known/openid-configuration](https://samauth.us-east-1.sws.siemens.com/.well-known/openid-configuration)”,  
> “recovery\_page\_path”: null,  
> “redirect\_uri\_path”: “/”  
> }

I am getting “ **state from argument does not match state restored from session** ” error.

Ideally it should request for code from OIDC (here it is [samauth.us-east-1.sws.siemens.com](http://samauth.us-east-1.sws.siemens.com)) server and then request for token by using code from the server only.

Could you please help me to use the OIDC plugin?
