OAuth Access Token Preflight Request Returns 405 Method Not Allowed CORS Error



Gepostet 14. Juni 2022

In trying to setup the oauth authorization flow, I am getting a 405 on the preflight request to /oauth/tokens. I have quadruple checked my code against the docs and examples (https://support.zendesk.com/hc/en-us/articles/4408845965210-Using-OAuth-authentication-with-your-application?page=2#comments), but no success.

Am I missing something in understanding what Zendesk expects to grant an access token? For example, am I running into errors because my origin is http://localhost:8081(i.e. not https)? Is there a way to avoid the sending a preflight with the OPTIONS method that's returning the 405?

I understand this may likely not be an issue with Zendesk, but advice on where else to look would be great appreciated.


0

1

1 Kommentar

Hi Zach! This is likely related to running tests to localhost with OAuth and less about anything on Zendesk's side specifically. This article does a good job explaining this concept using fetch instead of axios/XMLHttpRequest, but the same general principal should help you! Let us know if this helps out.

0


Melden Sie sich an, um einen Kommentar zu hinterlassen.

Sie finden nicht, wonach Sie suchen?

Neuer Post