I’m having a problem with authenticating our application using the gooddata-js and the loginSso function. First, it’s not clear to me why I need to use the targetUrl parameter from my JavaScript code. Second, more importantly, I’m getting a CORS related error when I perform the call. Can you help?
Best answer by Iva Gasparekova
Let me start with the second part of your question, please. Setting up the Cross-Origin Resource Sharing (CORS) is one of the prerequisites for successful setup of Authentication and Single Sign-On. The URL where your analytical application runs needs to be whitelisted in the CORS settings. Optionally, we can enable cross-origin redirects to sites allowed by your CORS settings as well.
Please understand, the targetUrl
is a mandatory parameter and it is required by our API. Since this parameter is required, it cannot be set as an empty string. Please use at least /
for successful Redirect.