UI: React.js(axios)(http://ipaddress:3001)
Backend: Node.js.
Single-sign-on
I my app from UI I am trying to hit '/login' route in node.js and fetching login_url from serviceProvider method(sp.create_login_request_url) in line 2, after receiving login_url i am trying to redirect to the received URL(login_url) in line 5 then I am getting the below error.
Node.js- login endpoint
- app.get("/login", function(req, res) {
- sp.create_login_request_url(idp, {}, function(err, login_url, request_id) {
-
-
-
- });
- });
Access to XMLHttpRequest at 'https://some.url/idp/SSO.saml2?SAMLRequest=someEncodedText' (redirected from 'https://dev-intcxsearch.dol.gov/login') from origin 'http://ipaddress:3001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.