My app is not navigated back to the okta login screen once the session expires.It shows refreshing

I am using “@okta/okta-react”: “^1.2.0”,
@okta/okta-signin-widget”: “^2.18.0”,.

Can anyone help me with this?