How does the auto login work?

Hello there, As I've read somewhere there is already some form of auto login functionality in Mendix if you use the login input widgets. I implemented this but now its very hard to see how the autologin works.  I made this for an app on Android. Sometimes I dont have to login and sometimes I do. There is no documentation to be found on it and the only thing i could find is the custom setting which sets the amount of auto logins before you have to fill them in again. But I've put that at unlimited.  Does anyone know what the logic behind this is? I'd rather not make a whole custom login widget.
3 answers

Hi Hunter,

You can check out this blog that walks through how to implement this functionality.




Here are a couple of things I can think off that might be causing some issues.

Then there is this in the runtime config options:


Determines how many minutes your token will remain valid before re-authenticating using your full credentials.

This setting defaults to -1, which is equal to no timeout.


I reckon the token is obviously a cookie, but as stated in the stackoverflow post Cordova / phonegap doesn't handle cookie storage well unless it is done in a specific way. Now I don't know how Mendix natively stores their cookies for this token. So maybe an insider of the Mendix R&D/Development can shed some light on that.


Hello Hunter,

what version of Mendix are you running? There was an issue with tokens for online hybrid apps which will be solved in 7.16.0.

It might be you're running into that issue.