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

[SDK-1994] GMaps breaks SPA JS on IE11 #592

Merged
merged 1 commit into from
Oct 6, 2020
Merged

Conversation

adamjmcgrath
Copy link
Contributor

Description

Google Maps adds a Symbol polyfill which causes core-js's Array.from polyfill to incorrectly return an empty array, eg when doing dedupe = (a) => Array.from(new Set(a)) (https://github.com/auth0/auth0-spa-js/blob/master/src/scope.ts#L4)

To fix see the 2 worksrounds in zloirock/core-js#618

  1. Put the maps api before the spa js SDK2.
  2. Add import 'core-js/es6/symbol'; before importing array-from

Since we can't expect customers to do #1, we should do #2 (adds 2.9kb GZipped to the spa binary)

References

https://auth0team.atlassian.net/browse/ESD-9069
zloirock/core-js#618 (comment)

Testing

Add the Google Maps JS API v3 to your page after the SPA SDK
Login through the SPA JS SDK

Expected Behavior
The user is logged in

Actual Behavior
The handle redirect callback will fail with "ID Token is required but missing"

@adamjmcgrath adamjmcgrath added this to the vNext milestone Oct 5, 2020
@adamjmcgrath adamjmcgrath requested a review from a team October 5, 2020 11:06
@adamjmcgrath adamjmcgrath changed the title GMaps adds a Symbol polyfill which breaks core-js's Array.from polyfill [SDK-1994] GMaps breaks SPA JS on IE11 Oct 5, 2020
@adamjmcgrath adamjmcgrath merged commit 7aa0c19 into master Oct 6, 2020
@adamjmcgrath adamjmcgrath deleted the ie11-gmaps-issue branch October 6, 2020 14:02
@stevehobbsdev stevehobbsdev added the CH: Fixed PR is fixing a bug label Oct 16, 2020
leemhenson pushed a commit to smolltd/auth0-spa-js that referenced this pull request Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Fixed PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants