Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82417

Hybrid app: remember login in after SAML login

$
0
0

I have implemented a SAML login in a hybrid app. However, I cannot get the autologin functionality to work, as is also mentioned in this forum post.

As an alternative I tried to set a cookie with this code:

samlWindow.executeScript({ code: "document.cookie;" }, function(values) {
                            var token = (values + ';').match(new RegExp("AUTH_TOKEN=(.*);"))[1];
                            window.localStorage.setItem("mx-authtoken", token);
                            samlWindow.close();
                            if(window.mx.afterLoginAction) {
                                window.mx.afterLoginAction();
                            } else {
                                console.log("startup");
                            }
                        });

The cookie is unfortunately also not created. Does anyone have a working way to keep a user logged in in a hybrid app? Ideally while keeping the sessions non persistent.


Viewing all articles
Browse latest Browse all 82417

Trending Articles