Access Token undefined for Cookie storage type

We are recently switched to cookie storage for our token, but we observed that the
const accessToken = await this.props.authService.getAccessToken() is returning undefined. If we switch to localStorage the access token starts showing up. Is there any implicit behaviour in case of cookie storage that we need to understand?

Have you configured tokenManager appropriately?

Yes, in the Security Component we have provided
tokenManager={{storageKey: oktaConfig.oidc.weekly.storageKey, secure: true, storage:‘cookie’}}

The configuration is working fine if we use storage= ‘localStorage’, it is just when we enable the cookie and the accessToken is gone.

Were you able to fix the issue with cookie tokenManager config?