openid / AppAuth-JS

JavaScript client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
Apache License 2.0
985 stars 161 forks source link

xhr: set the method explicitly #116

Closed acalvo closed 5 years ago

acalvo commented 5 years ago

As stated in https://api.jquery.com/jquery.ajax/#jQuery-ajax-settings the default value for method is GET. The same happens for Fetch API, so everything works fine in current browsers if method is left unset in both implementations.

There is a problem with older versions of Chrome, though. Chrome 53 (and surrounding versions) didn't honor this default value of Fetch API, and if you leave it unset it provokes an error in those versions.

@tikurahul How'd you feel if we set this method value to GET explicitly? It'd make no difference for current browsers, but we'd support older Chrome versions 😊.

tikurahul commented 5 years ago

You also need to sign the CLA before i can accept this PR.

acalvo commented 5 years ago

Yes. That should be okay.

😀

Is there a reason as to why you are using Chrome 53 out of curiosity ?

Long story short: we are doing some kind of feature-test to detect unsupported browsers and prevent them from accessing our webapp. Trying it out with different legacy browsers, I found that Chrome 53 (and surrounding versions, not sure up to which one) had this behavior and that it was the only problem with our app. We don't really need to support this legacy version, but being such a safe and simple fix, we thought it did worth it.

You also need to sign the CLA before i can accept this PR.

OK! I just did it.