Alpha Video Training
Results 1 to 2 of 2

Thread: Mobile Persistent Login

  1. #1
    Real Name
    Jeremy Scrime
    Join Date
    Sep 2015

    Default Mobile Persistent Login

    I've struggled with this for too long so I'm hoping someone can point me in the right direction on what I'm sure is a simple solution.

    Within a Mobile Application, I used the Alpha Template to generated a Mobile Persistent Login UX.
    I also have a separated application UX which I then embed into the Login UX within the PANEL_APPLICATION

    My embedded Application UX needs to know who is logged in, in order to filter various lists, and set a default foreign key field when I submit a record that indicates the current logged in user submitted this particular record. Prior to persistent login, I used an argument from the login ux an passed that to the embedded UX

    I was able to get this working in the persistent login example somehow, but after I closed the application (not logged out) and it re-logged in using the initial token I lost who the logged in user was.

    Basically, I need to know at all times the Primary Key of the logged in user in the embedded UX. I tried state variables but again after the initial login those seemed to be gone.

    Hopefully it's clear what I am trying to accomplish. Can anyone point me in a direction to accomplish the above?


  2. #2
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Unionville, ON

    Default Re: Mobile Persistent Login

    Using the Alpha sample, the token is created on the server and saved in the device localStorage. On the app 2nd and subsequent starts the token is retrieved. If it's there and not blank then it's assumed all is good and the app proceeds.

    It's up to you to follow the same practice with any other information you may want to save. You can't get a username if you haven't saved a username.

    Following the same pattern, get the username, and anything else you want, and save it in localStorage. When the app starts... get the token and everything else you've saved and push that data into controls in your app.

    I don't often use localStorage... I use the device File System... or SQLite... but the concept is all the same. If you need data, then save that data. You don't know when you'll be back to the server to get it there.

Similar Threads

  1. Persistent Login with PhoneGap
    By carlbsmith in forum Mobile & Browser Applications
    Replies: 3
    Last Post: 08-24-2017, 04:21 PM
  2. Token not generating for persistent login
    By carlbsmith in forum Mobile & Browser Applications
    Replies: 1
    Last Post: 08-09-2017, 06:32 PM
  3. Persistent Login with Security Groups
    By jcarnevali in forum Mobile & Browser Applications
    Replies: 4
    Last Post: 07-12-2017, 06:51 PM
  4. Replies: 3
    Last Post: 07-06-2017, 12:21 PM
  5. Persistent login (e.g. users logs in for two weeks)
    By parkjammer in forum Mobile & Browser Applications
    Replies: 19
    Last Post: 10-31-2014, 02:29 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts