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

google social login Secure issue #96

Open
Seunghan-Jung opened this issue Apr 21, 2021 · 2 comments
Open

google social login Secure issue #96

Seunghan-Jung opened this issue Apr 21, 2021 · 2 comments

Comments

@Seunghan-Jung
Copy link

The password window does not appear after entering the ID.

image

So cypress can't find the password input.

image

This is my code

describe('Login', () => {
  it('Login through Google', () => {
    const username = Cypress.env('googleSocialLoginUsername')
    const password = Cypress.env('googleSocialLoginPassword')
    const loginUrl = Cypress.env('loginUrl')
    const cookieName = Cypress.env('cookieName')
    const socialLoginOptions = {
      username: username,
      password: password,
      loginUrl: loginUrl,
      usernameSubmitBtn: '#identifierNext > div > button',
      headless: false,
      logs: false,
      loginSelector: '[href="/accounts/google/login/?process=login"]',
      postLoginSelector: '.account-panel'
    }
    
    Cypress.log({
      consoleProps: () => {
        return {
          'socialLoginOptions': socialLoginOptions
        }
      }
    })

    return cy.task('GoogleSocialLogin', socialLoginOptions).then(({cookies}) => {
      cy.clearCookies()

      const cookie = cookies.filter(cookie => cookie.name === cookieName).pop()
      if (cookie) {
        cy.setCookie(cookie.name, cookie.value, {
          domain: cookie.domain,
          expiry: cookie.expires,
          httpOnly: cookie.httpOnly,
          path: cookie.path,
          secure: cookie.secure
        })

        Cypress.Cookies.defaults({
          preserve: cookieName
        })
      }
    })
  })
})
@ShanikaWickramasinghe
Copy link

@cool-hammer I am also getting the same error. Were you able to get this error resolved

@and-why
Copy link

and-why commented Dec 20, 2021

Looks like there is more info over here: #43

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

3 participants