Hi,
We have solved it as follows: after logging off the session in a microflow, a page is opened. This contains a HTML snippet and a JavaScript snippet.
The HTML snippet contains the following:
<script type="text/javascript" src="cordova.js"></script>
The JavaScript snippet contains the following:
try{
var oauthLogout = function() {
var oauthWindow = cordova.InAppBrowser.open("about:blank", "_blank", "location=no,toolbar=no,clearcache=yes,clearsessioncache=yes");
var exitFn = function(){
oauthWindow.removeEventListener("exit", exitFn);
navigator.app.exitApp();
};
oauthWindow.addEventListener("exit", exitFn);
var cb = function(event) {
oauthWindow.removeEventListener("loadstop", cb);
oauthWindow.executeScript({
code: "console.log('yay');"
}, function(){
console.log('Opruimen succesvol');
mx.logout();
oauthWindow.close();
});
}
oauthWindow.addEventListener("loadstop", cb);
}
oauthLogout();
}catch(e){
console.log(e.message);
}
This closes our mobile app
Best regards
Diederik
HI Diederik,
I am also planning to implement SSO for native mobile app, can you please suggest me how you are able to achieve that or any links to docs?
Appreciate your response
Hi Diederik,
I have to use SAML with Mendix Native Mobile. However, I cannot find any document or example on this topic. If you did it, can you tell me how you did it or which document you used?
Best regards,
Gamze
Have you tried
navigator.app.exitApp()
See stackoverflow
Regards,
Ronald