Standalone PWA breaks login

General Tech Bugs & Fixes 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

We have a PWA written in Angular for which we use AzureAD (using ng-adal) for the login.

When we log in, a series of redirects are being made until we get back to our app (with the auth ticket). If we configure the "manifest.json" to display:browser, everything works as expected. The problem comes if we set it up as display:standalone. This way, when we install it in Android we get the look and feel of a native app (no browser chrome, splash screen,...) but the login breaks.

The effect we get is that the AzureAD page opens in a browser view (expected), but the redirection to our page is still on the browser view (with an X button in the to left corner). In this "browser view" we are authenticated, but if we use the X button, this view is closed and we go back to the PWA but remain unauthenticated.

Any idea of what might be happening?

Thanks!

Added a quick example (it's a test for another thing).

The icon at the top right corner redirects to another domain which redirects back to this page. If we add the app to an Android home screen (it does not add all the icons as I have not configured the PWA manifest completely, but the effect is view-able), we see that clicking on the icon, a web view opens to go to the first redirect but remains open for the second redirect back.

What I would expect is that the second redirect will goback to my PWA without the web-view chrome.

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.