Closed bjartebore closed 8 years ago
Hi,
I would urgently need this feature (unfortunately I cannot provide server functions in my app without a real logout). Can I implement this somehow or would it be required that the client.login() api function is modified?
Edit: Just tried it by myself modifying the login function, seems not to work (still login without user interaction).
Edit 2: After some more tests it seems to work on devices, Android and Windows Desktop, Windows mobile. It only fails for ripple. This would be exactly the behavior I would expect and what I need, but I wouldn't use this hack for the login api function in a released app. So it would be create if this could be officially changed/added in the plugin.
This is a common problem with InAppBrowser (or any browser-based popup for authentication) and using client flow (explained here) will help you solve the issue you mentioned.
@bjoernboeckle, in the short term the workaround suggested by @bjartebore can help, but it has the side effect of clearing all the cookies. This did not work for you while using Ripple as the parameters are InAppBrowser specific.
Using client.login() after logging out makes the login go through again without user interactions (new credentials). This could be solved with adding the clearcache=yes or the clearsessioncache=yes into the window.open() options argument.
e.g. var loginWindow = window.open(startPage, "_blank", "location=no,clearcache=yes")