Remove the manifest from iOS to allow OAuth redirect to works
See original GitHub issueLot of people are having issue with redirect at OAuth flow when using the apple-mobile-web-app-capable feature of iOS:
- https://stackoverflow.com/questions/51993155/redirecting-to-google-oauth-flow-in-progressive-web-app
- https://github.com/nolanlawson/pinafore/issues/45#issuecomment-411492711
- https://github.com/firebase/firebase-js-sdk/issues/77#issuecomment-432413393
- https://github.com/w3c/manifest/issues/449#issuecomment-382297785
I believe it can be solved by changing the:
<link rel="manifest" href="manifest.json">
to<link rel="no-on-ios" href="manifest.json">
when on iOS.It prevent the iOS Safari to process the manifest (which cause the bug)
So, i believe that this pice of code could be inside pwacompat.js to allow many of PWAs use OAuth login:
var iOS = !!navigator.platform && /iPhone/.test(navigator.platform);
if(iOS) {
document.querySelector('link[rel="manifest"]').setAttribute("rel", "no-on-ios");
}
At least until apple fix this issue (don’t know where or if is been tracked).
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How do I remove the web address in a display:standalone IOS ...
I stumbled across online that safari's full screen PWA apps will show the URL bar after a redirection to a different domain, to...
Read more >OAuth 2.0 for Mobile & Desktop Apps - Google Developers
Important: The loopback IP address redirect option is DEPRECATED for the Android, Chrome app, and iOS OAuth client types.
Read more >Authentication - Expo Documentation
Under "Valid OAuth Redirect URIs" add https://localhost:19006 and any other web URLs you may want to add. Press "Save Changes" in the footer....
Read more >oauth2_client | Flutter Package - Pub.dev
Flutter library for interacting with OAuth2 servers, with classes for transparent authorized requests, secure OAuth token storage, automatic token refeshing ...
Read more >Redirect Users - Auth0
To learn more about how the redirect_uri works, see OAuth 2.0 ... On (SSO) to allow your user to maintain an authentication session...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In exciting news, looks like new Safari betas might resolve this issue.
Thanks @samthor. I can confirm that iOS 12.2.0 fixes the issue for us. 🎉🎉🎉