x

CORS Error when using NodeJS Connect V2 API for OAuth2 Access

Following the guide posted on Square's Developer documentation. I can run the Node OAuth 2 sample from here: (https://github.com/square/connect-api-examples/tree/master/connect-examples/oauth/node) just fine locally with the Sandbox. But when I try to run a similar setup in a local React app, the obtainToken method from the square-connect Node library throws the following error:

 

Screen Shot 2020-09-08 at 2.48.07 AM.png

 

Not sure how to overcome the CORS policy here. Could I get some assistance please?

631 Views
Message 1 of 2
Report
1 REPLY 1
Alumni

It looks like you were able to figure this one out over in GitHub! 👍

 

Be sure to let us know here if you've got any outlying questions we can hep with, @SMPLInc.

Valentina
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
572 Views
Message 2 of 2
Report