OKTA OpenID session expired even when user is active


Am using OpenID authentication with Angular at front end and .net core at api end. Issue is even while am using the application the token is getting expired, why is OKTA not automatically refreshing token when the user is active? am getting the token from okta auth service everytime am making an API call, am I missing anything here? am using okta/okta-angular library, below is how I configured

oktaConfig: {
issuer: ‘’,
clientId: ‘’,
redirectUri: ‘http://localhost:4200/login/callback’,
postLogoutRedirectUri: ‘http://localhost:4200’,
scopes: [‘openid’, ‘profile’, ‘email’],
pkce: true,
tokenManager: { storage: ‘sessionStorage’}


providers: [
{ provide: OKTA_CONFIG, useValue: environment.oktaConfig }


constructor(private oktaAuth: OktaAuthService) { }

const accessToken = this.oktaAuth.getAccessToken();

Please let me know if am missing anything.