Specifically a web app added to the home screen on mobile device.
Here is the issue I'm running into:
my.app.comUserManager.signinRedirect()UserManager.signinRedirect() calls OidcClient.createSigninRequest()OidcClient.createSigninRequest() stores signin state in local storage and navigates to my.op.com see _on android my.op.com opens a Chrome tab and on iOS my.op.com opens Safari_my.app.com/signin-callback.html _here is the problem_On android my.app.com/signin-callback.html opens in the app opened from the home screen, on iOS it stays in Safari. Because Safari uses a different local storage for apps opened from the home screen then in the browser you get:
No matching state found in storage
I'm not having difficulty with the error, based on what is happening the error is completely expected, I just don't know how to get Safari to behave in a way that will work with the library..
see https://stackoverflow.com/questions/53948916/oidc-and-pwa-add-to-home-screen
PWA investigation is on my TODO list with @carlfranklin (once i get off my arse) :)
Hi, there is a solution passed by the staff of pwacompat.js see if that solves for you.
<link rel="pwa-setup" href="manifest.json">
<script async src="js/pwacompat.js"></script>
let iOS = !!navigator.platform && /iPhone|iPod/.test(navigator.platform);
if (iOS) {
document.querySelector('link[rel="manifest"]').setAttribute("rel", "no-on-ios");
}
Went with this variant https://github.com/firebase/firebase-js-sdk/issues/77#issuecomment-439324680 but yes that solves it. Can I close this? Should this solution be added to docs or FAQ?
Let's leave this open -- I'd like to have it until I do a PWA prototype.
@brockallen If you want to take a look we have a prototype using pwa, with your library.
Hey @brockallen , any updates for this?