On logout and relaunching the application, it again redirects to home page instead of okta login page in my iOS app


I am using okta login in my iOS application. When logout using the signout function provided by okta and relaunching after killing the application, it automatically navigates to home page instead of showing the okta login page.

Signout function used - OktaManager.shared().signOut(withHostViewController: nil)

On relaunching, it fires a logincallback function to OktaAppBase which is

for (OktaAppBase *app in self.apps) {
[app loginWithCallback:^(bool success, NSString *errorMsg) {
if (!success) {
[errorMsgs addObject:[NSString stringWithFormat:@"%@ Error: %@", app.appName, errorMsg]];
NSLog(@"%@ Error: %@", app.appName, errorMsg);

This is expecting a failure response as the cookies are expired while logout. But this returns a success case which automatically navigates to home page by skipping okta login screen.

I also tried to explicitly deleting all the cookies at logout, but doesn’t make any difference.
This is happening only on real devices. On checking with simulator, it is working as expected