title: Facing cors issue in Cypress while switching the domain
body: <p>Hi i am facing the common CORS issue with cypress using the Okta login. Below is the sample code snippet.</p>
  <pre><code>it('Login', () =&gt; {
  
    cy.visit(&quot;https://example.com/landing&quot;)
  
    cy.wait(3000);
    cy.get('.btn').click(); //clicks on Signin button
  
    //switches to other domain.
    cy.origin('https://login.xyz.com', () =&gt; {
  
    });
  </code></pre>
  <p>The login url further get navigated along some parameters line ProductID,OAuthCode,ClientID and locale.
  While running the test the page do gets successfully redirected to desired URL after Signin button is clicked, however immediately in the next step it gets reverted to the URL mentioned in the cy.origin and hangs in there.</p>
  <p>In the Cypress.config.js i have also set:</p>
  <pre><code>&quot;chromeWebSecurity&quot;: false, 
  &quot;experimentalSessionAndOrigin&quot;: true
  </code></pre>
  <p>Is there a way i can get down to the Sign page and pass on the credentials to move further.</p>