MrSwitch/node-oauth-shim

CORS issue

Closed this issue · 3 comments

Let me first say that I'm new to node, and I'm even greener when it comes to CORS stuff. I've enabled cors on my server using the cors npm package. The options request succeeds but the post returns a gateway timeout.

Is there something I need to configure with the shim to allow CORS requests yet?

Your service works great, and I trust you with the app secrets, but I'm not too sure my team will feel the same so I'd rather get this service up and running on my end.

Given that you record a server url with your service, I'm assuming that this needs to be passed to the oauthshim? Or do I need hello.js to attach a header when sending the requests?

@jsmits21 that's very odd, its getting through the preflight step of CORS (returning an OPTIONS header)

You dont need cors package - the library handles these.

If you want a point of reference, have you inspected the implementation for the //auth-server https://github.com/MrSwitch/auth-server/blob/b3f19c43c2bf74b3fb1c9a09004c426e482e0a1c/app.js#L252 yet?

inactive