Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skygear.authloginOAuthProviderWithPopup does not work in IE11 #496

Open
2 tasks
iam7seven7 opened this issue Mar 20, 2019 · 1 comment
Open
2 tasks

skygear.authloginOAuthProviderWithPopup does not work in IE11 #496

iam7seven7 opened this issue Mar 20, 2019 · 1 comment

Comments

@iam7seven7
Copy link

iam7seven7 commented Mar 20, 2019

  • Skygear SDK Date/Version: 1.7.2
  • JS runtime:
  • Skygear Server Date/Version:
  • Is this a regression?
  • Attached logs, screenshots

Expected Results

Popup should close

Actual Results

Popup did not close

Steps to reproduce

  1. Call skygear.authloginOAuthProviderWithPopup()
  2. Do whatever you need to in SSO provider page in popup
  3. Popup is blank and won't auto close after login success.

At first it give error

Unhandled promise rejection ReferenceError: 'Promise' is undefined

After adding to auth_handler.html:

<script type="text/javascript" src="https://code.skygear.io/js/polyfill/latest/polyfill.min.js"></script>

, the error message goes away but the popup still won't close.

I believe it is because the popup cannot postMessage to the opener window as IE10/11 doesn't support cross-origin postMessage.
Possible workaround: https://stackoverflow.com/a/36630058

@louischan-oursky
Copy link
Contributor

Per discussion with Carmen, we should add polyfill directly to the bundle itself. Instead, we should ensure all html templates include the polyfill

<script type="text/javascript" src="https://code.skygear.io/js/polyfill/latest/polyfill.min.js"></script>

before

our bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants