Site Application Installer (PWA remember log in)

Joey Champion Posted in Component Development 3 years ago

Good day friends.
I hope someone in the community will know how to answer this question.
Is it possible to store the log in credentials in the Site App Installer component?
The PWA, (progressive web app is amazing).
The only issue is the PWA requires users to log in upon every visit to the site.
The "Remember Login" component does not work with PWA.
I know Z-Man is the genius behind the Site Application Installer and he is probably the most qualified to answer.
PWAs are such an improvement over traditional app design. Not only does the site load quickly using the PWA that Z-Man created, the PWA uses less system resources on mobile devices. Try the component out and you will see the responsivness of the PWA.
Android supports PWA, Apple now Supports the PWA (tested on iphones from a very old iphone 5s to iphone X).
The PWA is super smooth and gives a perfect representation of your site, all functions ie. site branding, logos, themes, all videos play, you name it. You even get to use your own icon for the PWA. (Genius)! Windows and Linux support the PWA. (Tested on Windows 10 and Ubuntu). It is an ideal solution to a rock solid Mobile app for your OSSN site.
If we could just figure out how to store the login credentials.
I hope you all have a blessed day and an awesome weekend.

us Joey Champion Replied 3 years ago

Thank you everyone. (I feel like such an idiot this morning). I don't know what has changed... honestly, I can not recreate the problem with PWA and persistent login. Every time I log in as a standard user, check the box to "Remember Me" , use the site, leave the site, close PWA. Go back later, launch the PWA, it goes directly to the community wall post. (PERFECTLY AS IT SHOULD).
I am completly bewildered. (Scratching my head in total amazement).
I feel like I woke up this morning into an alternate reality...
Everyone was right, Arsalan, ~Z~Man, you were all correct... There is no problem with remembering login credentials on Site App Installer, (PWA) when used in conjunction with the Remember Login component.
Wow, ~Z~Man, the universe aligns itself with you my friend. Your power of positive mind makes things just work when you delclare that they will.
I am completely amazed!
Thank you all.

German Michael Zülsdorff Replied 3 years ago

I can't confirm that. Yesterday, I installed a PWA of your site on my Pixel 3 running Android 11 and tried several cases like closing the PWA, turning the phone to standby and finally switching it off completely over night. Switching it on this morning and starting your PWA was leading me straight to /home. No issues.

I'm almost sure that your different experience was caused by using the same device and switching between a 'normal' user (who's login would be stored) and an admin user (who's login would be trashed)

What we have to have in mind is that even if a PWA may look like a native app: under the hood it's nothing but a 'stripped-off' browser. And that means it still shares a lot of your browser settings - cookies included.

So if you managed to remember the login of User A from your Android PWA and start Chrome afterwards you'll find yourself logged in as User A, too. And that is: If you decide to log off from Chrome now (because you want to use Chrome for doing some admin stuff) the 'remember-login' cookie of User A gets trashed consequently. And because this cookie was shared with the PWA, you'd find yourself logged off when you start the PWA next time.

The same will happen on a PC if you're running a PWA in parallel with the browser it was derived from and you have configured your browser to 'forget everything' after closing.

us Joey Champion Replied 3 years ago

Thank you everyone for your testing. I guess it is only a problem with Android devices, ie. Tablets and Android Phones. Thanks again.

Indonesian Arsalan Shah Replied 3 years ago

I also tested from Chrome and it worked, I restarted my IP, restarted my system , opened the website Icon and it worked and took me straight to /home page. Didn't asked for login.

German Michael Zülsdorff Replied 3 years ago

using Windows 10 Home Version 2004 here and latest Edge 90.0.818.66 I gave it a try last night and installed a PWA instance of my site plus a test user to remember. In the end I closed the PWA.
No issues this morning. Opening the PWA again - and that user got the same /home view as 9 hours ago.

Continued with your site an hour ago ...

  • Registered an account
  • Clicked account activation link in the email I received
  • Checked 'Keep me logged in' on your frontpage
  • Logged in
  • Opened my browser settings to install your site as a PWA
    enter image description here
  • (you notice my already installed PWA at the bottom)
  • Clicked 'Install' and got enter image description here
  • Confirmed installation by clicking the 'Installieren' button
  • The PWA window openen in parallel with the Edge window
  • Closed both Edge and PWA
  • Had a breakfast (~ 1 hour)
  • Back on the PC opened the Windows Tab
    enter image description here
  • (showing your PWA and mine)
  • Clicked your PWA's icon
  • and I'm back were I left - no new login required
us Joey Champion Replied 3 years ago

Yes, -Z- Man, I am aware of of that. (Your sarcasm is duly noted).
I have signed up dummy accounts, (standard user accounts), so I can log in as a general user to the site to test various features. (I like to know and see things from a users perspective).
Since your the one who created the component, have you not tried it to view your site or any for that matter to see how it works for a general user???
Go ahead, try my site...
Install the PWA. Log in and close the PWA. Wait five to seven minutes and I GUARANTEE YOU WILL BE REQUIRED TO SIGN IN AGAIN.
So lets try this another way. Can we figure out a way to make the login persistent with PWA?
I have Googled it and Login Persistence is a common problem with PWAs. (Just Google "PWA Keep User Logged In").
I just thought your skillset was better than most and just maybe, you would know a way.
Thank you.

German Michael Zülsdorff Replied 3 years ago

you are aware that AutoLogin doesn't work with administrator accounts for security reasons ?!?