# Example Script works everywhere EXCEPT in IE

**URL:** <https://community.auth0.com/t/example-script-works-everywhere-except-in-ie/20801>\
**Category:** Get Help\
**Tags:** internet-explorer\
**Created:** [January 31, 2019, 6:07am UTC](https://community.auth0.com/t/example-script-works-everywhere-except-in-ie/20801 "2019-01-31T06:07:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stevo/32/12715_2.png) [@stevo](https://community.auth0.com/u/stevo)\
**Post date:** [January 31, 2019, 6:07am UTC](https://community.auth0.com/t/example-script-works-everywhere-except-in-ie/20801/1 "2019-01-31T06:07:49Z")

</div>

I have been following this QuickStart: [https://auth0.com/docs/quickstart/spa/vanillajs/02-user-profile](https://auth0.com/docs/quickstart/spa/vanillajs/02-user-profile)

And after testing on my PC uploaded the project to my website, after:

- changing the base tag to `<base href="/testarea/auth0">` (in index.html)
- adding my domain as an Origin (in Dashboard)
- adding my domain (with path) as a Callback (also in Dashboard)

everything worked perfectly UNTIL I started testing in Internet Explorer.

Both Firefox and Chrome allowed me to sign-up and log-in, Internet Explorer just chokes. The error message from the console (F12 to get console) says:

> SCRIPT1002: Syntax error  
> app.js (63,48)

Which corresponds to the start of the arrow function in this code :

```auto
  function renewTokens() {
   webAuth.checkSession({}, (err, authResult) => {
      if (authResult && authResult.accessToken && authResult.idToken) {
        localLogin(authResult);
      } else if (err) {
        alert(
            'Could not get a new token ' + err.error + ':' + err.error_description + '.'
        );
        logout();
      }
      displayButtons();
    });
  }

```

TIA, S

**PS** _I wouldn’t be using IE if I had a choice_😣

**PSS** _I assume it goes without saying that I’d appreciate help getting this modified for IE_😉

---

<div class="post-metadata">

**Author:** ![stevo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/stevo/32/12715_2.png) [@stevo](https://community.auth0.com/u/stevo)\
**Post date:** [January 31, 2019, 6:38am UTC](https://community.auth0.com/t/example-script-works-everywhere-except-in-ie/20801/2 "2019-01-31T06:38:22Z")

</div>

Oh wow - IE does not support Arrow Functions 🤣

Modified code works…

```auto
function renewTokens() {
  webAuth.checkSession({}, function (err, authResult) {
    if (authResult && authResult.accessToken && authResult.idToken) {
      localLogin(authResult);
    } else if (err) {
      alert('Could not get a new token ' + err.error + ':' + err.error_description + '.');
      logout();
    }
    displayButtons();
  });
}

```

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [January 31, 2019, 2:26pm UTC](https://community.auth0.com/t/example-script-works-everywhere-except-in-ie/20801/3 "2019-01-31T14:26:33Z")

</div>

Glad you made it work and thanks for sharing with the rest of community!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 15, 2019, 2:26pm UTC](https://community.auth0.com/t/example-script-works-everywhere-except-in-ie/20801/4 "2019-02-15T14:26:36Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
