Skip to content

Secure login using the EncryptedLocalStore in Adobe AIR

August 18, 2008

Adobe AIR has a quick and safe way to store encrypted user data when building applications. Data such as login and password can be persisted in the application using the EncryptedLocalStore available for AIR applications.

To demonstrate this, I wrote a quick demo application that will store username and password after users login. When the application is launched again, the same username and password will be retrieved from the EncryptedLocalStore and propagate the login and password text boxes. User’s also have the option to reset the data and store a new username and password, removing the stored data from the EcryptedLocalStore.

This can be handy when you want your application to do auto-login, using the existing stored information from the user’s previous session, and of course, the stored data is encrypted.

Example:

[as lang="ActionScript"]

[/as]

To use the example code, just create a new AIR application in Flex Builder and paste the code into your main MXML file.

-Mister

Advertisement

From → AIR, Flash Builder

6 Comments
  1. abhishek permalink

    its really good example,
    could u tell where exactlly the uername and password files are stored on local pc ?

  2. Lar permalink

    Hmmmm. That looks a lot like the code I wrote while at AOL.

  3. Lar, you mean because, like your code, it had to be fixed to work? Haha. Actually this code is similar to login code that was implemented for the desktop application in the last public release but also borrows from other examples on the web and modified to make a practical login example. Since we often borrow from other examples, it seems fair to give back to the community. Also, we never mention the evil empire on this blog, nobody wants that kind of bad luck!! :)

  4. Thanks for your login tutorial in flex, nice.

  5. Mesmo permalink

    Hi, could you explain please, how i save user and password my air application in your code so for later i typing username, password loading and enter, i try understand where and how save username, password inside code to export for air application for later enter normally using username,password that i save inside code.

    Best,

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

Please log in to WordPress.com to post a comment to your blog.

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.