IdentityModel / oidc-client-js

OpenID Connect (OIDC) and OAuth2 protocol support for browser-based JavaScript applications
Apache License 2.0
2.43k stars 842 forks source link

Silent Refresh not initiating token refresh request #1312

Closed BhanuGunda closed 3 years ago

BhanuGunda commented 3 years ago

Describe the bug Calling mgr.signinSilentCallback() the backend api token refresh request is not triggered

To Reproduce Configurations made:

{ authority: ${environment.Authority}/, client_id: environment.clientId, client_secret: ${this.envService.clientSecret},
redirect_uri: ${this.envService.clientRoot}/auth-callback?auth=authc, automaticSilentRenew: true, silent_redirect_uri: ${this.envService.clientRoot}/auth-callback?auth=refreshToken, post_logout_redirect_uri: ${this.envService.clientRoot}/logout, response_type: 'code', response_mode: 'fragment', loadUserInfo: false, filterProtocolClaims: true, scope: environment.clientScope, extraQueryParams: { resource: 'sfr_web_dev' },

  metadata: {
    issuer: `${environment.Authority}`,
    authorization_endpoint: `${environment.Authority}/oauth2/authorize`,
    userinfo_endpoint: `${environment.Authority}/userinfo`,
    jwks_uri: `${environment.Authority}/discovery/keys`,
    end_session_endpoint: `${environment.Authority}/oauth2/logout`,
    token_endpoint: `${this.envService.clientRoot}/token`,
  }

Expected behavior Backend api call should get initiated on calling silent refresh(). It is not triggering backend apicall. No error is shown

brockallen commented 3 years ago

Have you tested this in the VanillaJS sample app? Last time I checked, signinSilentCallback is working properly there. There's not enough info above to know why you might be having problems.