繁体   English   中英

在 iOS 15+ 上的 PWA 中设置 window.location 失败以获取身份验证体验

Failure setting window.location in PWA on iOS 15+ for authentication experience

提示:本站收集StackOverFlow近2千万问答,支持中英文搜索,鼠标放在语句上弹窗显示对应的参考中文或英文, 本站还提供   中文繁体   英文版本   中英对照 版本,有任何建议请联系yoyou2525@163.com。

我目前正在构建一个网站,该网站提供使用 Facebook 登录作为让用户在我自己的身份系统中进行身份验证的方法,并且它在所有平台上的普通浏览器中运行良好。 But when I install it as PWA on iOS 15+, the Facebook login is not functioning as expected as the webView is not honoring the window.location=<MY OWN CALLBACK URL TO MY SERVER> . Below are the scripts from my server that's handling the callback from Facebook, seems both window.opener.location and window.location setting failed because the popup window was closed but nothing happened in the opener.

<script type="text/javascript">
    var redirectUri = '${myApp() + "/login?"}';
    redirectUri = redirectUri + "access_token=" + "${access_token?no_esc}" + "&token_type=fb";
    redirectUri = redirectUri + "&_eventId=loginFromFacebook";
    

    if ( window.opener ) {
        window.opener.location = redirectUri;
        self.close();
    }

    window.location = redirectUri;

</script>
问题暂未有回复.您可以查看右边的相关问题.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题
 
粤ICP备18138465号  © 2020-2022 STACKOOM.COM