I tried to create a Salesforce community remote hybrid app using the forceios. I have set all the configuration for the same.
I am now able to login to the app.
But when I hit logout and exit the app; then again run the app, The app directly logs me in, and the old login session seems like it has not been cleared.
The control of the app here seems to be inside the cordova and I am not able to do anything.
Is there a way to logout the user, when the user hits logout inside the remote hybrid app?

I am able to access the cordova library and fetch the action when the logout is pressed by using the following in the CVViewcontroller

- (BOOL)webView:(UIWebView*)theWebView shouldStartLoadWithRequest:(NSURLRequest*)request navigationType:(UIWebViewNavigationType)navigationType
    NSURL* url = [request URL];
    NSLog(@"Request : %@",request);
    if ([[NSString stringWithFormat:@"%@",url] containsString:@"logout.jsp"])
    //    Logout Pressed

I wanted to know if it is possible to logout the sessions of the app from within the cordova library code.

Update : The issue has been addressed here. This is about editing the salesforce apex code. Is there a different way to do this without editing the apex code?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.