# Token Endpoint call - Works on Chrome/Firefox NOT Internet Explorer 11 (IE 11)

**URL:** <https://devforum.okta.com/t/token-endpoint-call-works-on-chrome-firefox-not-internet-explorer-11-ie-11/6622>\
**Category:** Questions\
**Created:** [October 16, 2019, 11:26pm UTC](https://devforum.okta.com/t/token-endpoint-call-works-on-chrome-firefox-not-internet-explorer-11-ie-11/6622 "2019-10-16T23:26:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cking27](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@cking27](https://devforum.okta.com/u/cking27)\
**Post date:** [October 16, 2019, 11:26pm UTC](https://devforum.okta.com/t/token-endpoint-call-works-on-chrome-firefox-not-internet-explorer-11-ie-11/6622/1 "2019-10-16T23:26:45Z")

</div>

Hello,

I have a situation where my PKCE flow works in chrome/firefox but not in IE 11. By PKCE flow I mean:

1. SEND AUTHORIZE REQUEST- From MyApp.js calld okta/authorize endpoint with code, clientid, scope, state, redirect uri, code\_challenge, etc…
2. RECEIVE CODE - MyApp receives a CODE from Okta as part of [http://myapp?code=232f23423](http://myapp?code=232f23423)
3. SEND TOKEN REQUEST -From MyApp.js call v1/token endpoint sending back the code along with the code verifier, etc…

Comparing the calls in step 1, the GET url params in the authorize request are identical. So I do get a code back from Okta in both scenarios… However my step 3 (token request), ALWAYS returns a 403 when running in IE. The form params look identical here as well.

Is anyone aware of any gotchas or things to be aware of when making the token request in IE 11. Are there additional settings that I need to be making (its an XMLHttpRequest POST) that I am making.

Thank you Okta community for any help/insights!

Charlie

---

<div class="post-metadata">

**Author:** ![dragos](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/dragos/32/1313_2.png) [@dragos](https://devforum.okta.com/u/dragos)\
**Post date:** [October 18, 2019, 1:19am UTC](https://devforum.okta.com/t/token-endpoint-call-works-on-chrome-firefox-not-internet-explorer-11-ie-11/6622/2 "2019-10-18T01:19:34Z")

</div>

Hi @cking27

Can you please try the authorization code flow with PKCE with the sample available [here](https://github.com/dragosgaftoneanu/okta-js-scripts/blob/master/auth_code_flow_pkce_spa/index.html)? I’ve tested it now on IE version 11.885.17134 and it worked successfully.

---

<div class="post-metadata">

**Author:** ![cking27](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@cking27](https://devforum.okta.com/u/cking27)\
**Post date:** [October 18, 2019, 8:57pm UTC](https://devforum.okta.com/t/token-endpoint-call-works-on-chrome-firefox-not-internet-explorer-11-ie-11/6622/3 "2019-10-18T20:57:25Z")

</div>

Thank you @dragos for your reply! I can confirm based on your sample PKCE example this does work in IE 11. With this code I was able to verify that my problem relies on some additional security settings (that I am still nailing down) that my company has placed on internal builds of IE. Very helpful, tks!

---

<div class="post-metadata">

**Author:** ![cking27](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@cking27](https://devforum.okta.com/u/cking27)\
**Post date:** [October 29, 2019, 3:37pm UTC](https://devforum.okta.com/t/token-endpoint-call-works-on-chrome-firefox-not-internet-explorer-11-ie-11/6622/4 "2019-10-29T15:37:16Z")

</div>

@dragos, I happen to be seeing small differences in how I do the sha256/base64encoding of a string in the libraries I’m using in IE11. In your example I see you have the code challenge hardcoded for simplicity sake. Do you happen to know what lib u used to do the generation?

---

<div class="post-metadata">

**Author:** ![cking27](https://avatars.discourse-cdn.com/v4/letter/c/67e7ee/32.png) [@cking27](https://devforum.okta.com/u/cking27)\
**Post date:** [October 29, 2019, 6:20pm UTC](https://devforum.okta.com/t/token-endpoint-call-works-on-chrome-firefox-not-internet-explorer-11-ie-11/6622/5 "2019-10-29T18:20:45Z")

</div>

Sorry @dragos, you can ignore. I hadn’t noticed that the base64 encoding done by code that I had grabbed(Okta pkce example) did some char replacement before sending the code challenge string.

```
.replace(/\+/g, '-').replace(
                    /\//g, '_')
                .replace(/=+$/, '');

```

Once I had done that things began to work.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 18, 2024, 12:27am UTC](https://devforum.okta.com/t/token-endpoint-call-works-on-chrome-firefox-not-internet-explorer-11-ie-11/6622/6 "2024-01-18T00:27:40Z")

</div>

Closed on January 18, 2024, 12:27am UTC

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