Login Approach for a Flex Mobile Application

September 11, 2011

I find that the best way to make a log-in for a flex application is to make it via states. I originally made my application have a log-in that then forwarded to a new view, but the transfer of data and the overall efficiency proved to be a lot easier by using states between the “LogIn” and the “HomeView”.

The data object saved by the phone while the application is running can keep a user log-in in when the user closes out of the application for a little while. If a username variable in the data object is available, then you can make ‘currentState = “HomeView”‘ otherwise have the ‘currentState = “LogIn”‘.

Again, it’s possible to do it completely with views and data forwarding. I just ran into problems with the back button returning you to the “LogIn” view even though they were already signed in. (since data is only easily pushed to new views. Views needs to be set up to get data from popped views, only to find they need to forward to the next view because they were already signed in.) Although I think there is a way to pop the “LogIn” view from the view stack, but overall I found this method less complex for application authentication.

Stay in Touch!

Subscribe to our newsletter.

Solutions Architecture

browse through our blog articles

Blog Archive