Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. #3

Open
bhargavr445 opened this issue Jan 29, 2020 · 0 comments

Comments

@bhargavr445
Copy link

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

  1. app.get("/login", function(req, res) {
  2. sp.create_login_request_url(idp, {}, function(err, login_url, request_id) {
  3. if (err != null)
    
  4.   return res.send(500);
    
  5. res.redirect(login_url);
    
  6. });
  7. });

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant