⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

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

@bhargavr445

Description

@bhargavr445

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions