title: Keep getting session out with OIDC JS client and Identity server 4 Authorization flow with PKCE flow on Azure app services
body: <p>Using Identity server 4 with OIDC JS client in every 10 seconds the application reloads, in the network tabs I can see</p>
  <p><a href="https://i.stack.imgur.com/s0dWk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s0dWk.png" alt="enter image description here" /></a></p>
  <p>The end session URL is always been canceled and application reload frequently</p>
  <pre><code>Request URL: https://falconidentityserver.azurewebsites.net/connect/endsession?id_token_hint=eyJhbGciOiJSUzI1NiIsImtpZCI6IjU1RDY5MTZFODVCOUNENTgwRjQ0RTMzNzREMjZFOUFCIiwidHlwIjoiSldUIn0.eyJuYmYiOjE2MTAzNzU0NjQsImV4cCI6MTYxMDM3NTc2NCwiaXNzIjoiaHR0cHM6Ly9mYWxjb25pZGVudGl0eXNlcnZlci5henVyZXdlYnNpdGVzLm5ldCIsImF1ZCI6IkZldGVfQmlyZF9VSSIsImlhdCI6MTYxMDM3NTQ2NCwiYXRfaGFzaCI6IlVDaUt3LXBBdi14aFVINFRZVXk1a1EiLCJzX2hhc2giOiI5clc3UUY5ZEtqRXdubE9lTWpRTTVBIiwic2lkIjoiQjYwNEJBNEU5MTEyOURCQjYzNTJFOEJDNDZFQUM5QkUiLCJzdWIiOiJlNDEzMTIwYS0yYWEzLTQzZTktYTQ1MC1lZWU2NzBjY2EzMjEiLCJhdXRoX3RpbWUiOjE2MTAzNzU0NTEsImlkcCI6ImxvY2FsIiwiYW1yIjpbInB3ZCJdfQ.lmfq1ZJ2ukkrZ-FPjtCPaEsBYM0HXCAF496dNGMH0WP-SBFbbSllLSPGcavpruzzA0n-JQmkshtEqhyMvk5-c81dQLgjblrQ-X5QrzGoRd6fXDMnWwR0dlm2ZC2TcPOcBJXdaW1nfjLChxxrQljHMNLBr1tAmPfTfx0kaG7uvoXg1iY1aNmBsFUs4erdYs24Wd0JPtGzlHrGc3wyXk7aJNS77Ocu9SHUTL5XLsecOPMX0CVqeAX0ibRT6b-VuJ6u0egMKzR6yS8vCx4DNdHIScuX-zyMvisDePiCwqbN_K9VE0iwy2CmNfMKmioPX-aora7V1qZwCdj2-Lp-OSVVwg
  </code></pre>
  <p><a href="https://i.stack.imgur.com/d2fWw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d2fWw.png" alt="enter image description here" /></a></p>
  <p>Identity server client setting</p>
  <pre><code>new Client
                  {
                      ClientId = &quot;XXXXXXXXXXXXXX&quot;,
                      ClientName = &quot;XXXXXXXXXXXXXXXX&quot;,
                      AllowedCorsOrigins = CorsUris(configuration),
                      AllowedGrantTypes = GrantTypes.Code,
                      AllowAccessTokensViaBrowser = bool.Parse(configuration.GetSection(&quot;IdentityServer:Client:AllowAccessTokensViaBrowser&quot;).Value),
                      IdentityTokenLifetime = 300,
                      AccessTokenLifetime = 200,
                      RequireConsent = bool.Parse(configuration.GetSection(&quot;IdentityServer:Client:RequireConsent&quot;).Value),
                      UpdateAccessTokenClaimsOnRefresh = bool.Parse(configuration.GetSection(&quot;IdentityServer:Client:UpdateAccessTokenClaimsOnRefresh&quot;).Value),
                      RedirectUris = LocalRedirectUris(configuration),
                      PostLogoutRedirectUris = LocalRedirectUris(configuration),
                      AllowedScopes = AllowedScopes(),
                      AllowOfflineAccess = bool.Parse(configuration.GetSection(&quot;IdentityServer:Client:AllowOfflineAccess&quot;).Value),
                      AccessTokenType = AccessTokenType.Jwt,
                      RequireClientSecret = bool.Parse(configuration.GetSection(&quot;IdentityServer:Client:RequireClientSecret&quot;).Value),
                      RequirePkce = bool.Parse(configuration.GetSection(&quot;IdentityServer:Client:RequirePkce&quot;).Value),
                      //AllowRememberConsent = true
                  },
  </code></pre>
  <p>OIDC client setting</p>
  <pre><code>openID = {
  authority: 'https://falconidentityserver.azurewebsites.net',
  client_id: 'xxxxxxxx',
  redirect_uri: 'https://localhost:4200/auth-callback',
  silent_redirect_uri: 'https://localhost:4200/assets/silent-renew.html',
  response_type: 'code',
  scope: 'openid profile email',
  automaticSilentRenew: true
  </code></pre>
  <p>};</p>
  <p>I don't know what I am missing and where is the issue. Can anyone help me with the this issue</p>
  <p>I am doing silent reniew and it is working fine as you can see in the network tab.</p>
  <p>OIDC usermanager logs</p>
  <p><a href="https://i.stack.imgur.com/x6cQU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x6cQU.png" alt="enter image description here" /></a></p>