facebook

Login Form with Web SQL and local storage

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #344074 Reply

    nvts
    Member

    Login Form with Web SQL and local storage

    After receiving direct emails asking how I was performing a login screen using web sql and local storage for tracking if this was the first time the app was run on a certain device, I decided to put together a simple example.

    I used the same screens as Wayne’s Login example to keep it familiar for those that asked for a local database stored login form example.

    This example performs the following:

    1. Creates a Web SQL db nvtspasslock and a table Passlock and Field passcode.
    2. If this was the first time run, it will also populate the table with the passcode admin and store a local key nvtsDlIntial with a value of false, so it will not populate again.
    3. It verifies that a user name and valid passcode was entered before loading the welcome screen.
    4. Once a user name and valid passcode is entered, it will load the welcome screen with the entered user name displayed in the title bar and welcome message. The initial passcode is admin or a static/admin password of 1234 is coded in for override reasons (forgotten passwords).
    5. When on the welcome screen click on the gear in the lower tool bar to access the passcode screen. On the passcode screen you can click on the check mark in the lower tool bar to display the current displayed stored passcode or enter a new passcode and update.
    6. If you return back to the login screen it will retain the entered user name, but clear the passcode for validation again.

    See attachment login.png See attachment welcome.png See attachment passcode.png See attachment resources.png

    All the code is in the login_custom.js file and documented for easy following. I hope this helps some of you newbie’s out there as I was and still am a newbie.

    Cheers…

    See attachment login-sql.zip

    Attachments:
    You must be logged in to view attached files.
Viewing 1 post (of 1 total)
Reply To: Login Form with Web SQL and local storage

You must be logged in to post in the forum log in