Hello!
I’ve been testing oAuth for the live documentation (SmartDoc) in the Custom Developer Portal and something seems not to work.
I have attached two screenshots to help my explanation.
So…
Thanks!
Solved! Go to Solution.
Hi @nicolas badano - This very likely is because the proxy is missing support for CORS. Refer to the following documentation to add CORS support: https://docs-new.apigee.com/publish-apis
Hi @nicolas badano - This very likely is because the proxy is missing support for CORS. Refer to the following documentation to add CORS support: https://docs-new.apigee.com/publish-apis
Thanks @arungopal! I will look into this. But by doing a quick read of the link you've sent I think you are spot on. I'll let you know as soon as I give this a try.
@arungopal I have added CORS policy and CORS preflight as per the link you suggested. But it's still not working. If I perform a trace I can see the request is actually an OPTIONS one but it's failing with status 401 and {"ErrorCode" : "invalid_client", "Error" :"Client identifier is required"}. If I ran the curl command, the trace shows a POST request and everything works fine. So if I understand correctly, the web browser, or the developer portal, is sending the OPTIONS request in my behalf, but it's not attaching the correct credentials in the header, how can I fix this? Maybe I'm getting this whole thing wrong (pardon my ignorance, I'm no web developer...just an apps developer trying to make a backend work).
@nicolas badano - you are good, i see another user who has run in to the same issue. Refer : https://community.apigee.com/questions/64713/developer-portal-5.html . Let me know if the solutions proposed there help.