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

Cypress 13.16 Login SSO get error "{"error": "CSRF token was invalid or missing."}" #30774

Open
LiZhang19817 opened this issue Dec 17, 2024 · 0 comments

Comments

@LiZhang19817
Copy link

LiZhang19817 commented Dec 17, 2024

Current behavior

When using Cypress login my application and redirect to the SSO login page, then providing valid credentials, the SSO Redirect to my application with error "error": "CSRF token was invalid or missing", pls help give some suggestion of how to handle this issue in Cypress?

Desired behavior

Cypress should login the SSO successfully and callback to my application successfully.

Test code to reproduce

    it('mysso', function(){
            cy.visit("https://stage.myapplication.com", {timeout: 120000});
            cy.get('.hidden-xs > [ng-switch-default=""] > .user-view').click();

            cy.origin('https://sso.myapplication.com', () => {
                cy.get('#username-verification', {timeout:6000}).type("demo");
                cy.get('#login-show-step2', {timeout:6000}).click();
                cy.get('#password', {timeout:6000}).type("Welcome123");
                cy.get('#rh-password-verification-submit-button',{timeout:6000}).click();
            })

            cy.get('li.dropdown').contains('Sign out all sessions');
    })

Cypress Version

13.16

Node version

20.16

Operating System

Mac0s

Debug Logs

No response

Other

NA

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