We were now trying to use the JS SDK with this token.
As u said on a different post:
The client credentials option is in the JavaScript SDK because the SDK is built for both node.js and browsers. When used in a browser, the client credentials login won't work. When used in node, the implicit grant won't work.
This means that we cannot use the SDK on the browser side with a SAML token? If that's the case, we will need to code the AJAX calls to the REST API, are we right?
The implicit grant and SAML 2 Bearer grant are different grant types, so they can't be substituted for one another.
You're probably getting CORS errors because your configured redirect URLs don't include the origin you're making requests from. I'm guessing this is because the server exchanging the SAML assertion for an auth token is not the same server/URL that's making the API requests using the token. Whatever the origin is for where the API requests are being made needs to be added as a redirect URI in the oauth application config.
No, a SAML grant and a client credentials grant are two different grant types and are unrelated.