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

auth option on cy.visit doesn't seem to work with "https" domain #1723

Closed
pablote opened this issue May 15, 2018 · 1 comment
Closed

auth option on cy.visit doesn't seem to work with "https" domain #1723

pablote opened this issue May 15, 2018 · 1 comment

Comments

@pablote
Copy link

pablote commented May 15, 2018

Current behavior:

I get an "Unauthorized" error when trying to access an https site using the auth option in cy.visit().

1

Authentication is set like this:

Cypress.Commands.overwrite('visit', (orig, url, options) => {
    options = options || {};
    options.auth = {
      username: Cypress.env('AUTH_USER'),
      password: Cypress.env('AUTH_PASS')
    };
    return orig(url, options)
});

If I set the same username/password in the url instead before the host name, then it works fine:
2

Bad thing about this is, username/password on the url works fine on chrome but not on electron: #1639.

So right now I'm unable to test an https site headless from CI.

Desired behavior:

I can access https site, using auth option.

Steps to reproduce:

Try to access an https site, with basic security, and use the auth option in cy.visit() to authenticate.

Versions

Cypress 2.1.0
macOS 10.13.4
Chrome 66, Electron 59

@jennifer-shehane jennifer-shehane added type: bug stage: needs investigating Someone from Cypress needs to look at this labels May 16, 2018
@jennifer-shehane
Copy link
Member

Since this issue hasn't had activity in a while, we'll close the issue until we can confirm this is still happening. Please comment if there is new information to provide concerning the original issue and we'd be happy to reopen.

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

No branches or pull requests

2 participants