Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

197
Visualizações
How to test auth0 login with github using cypress

I'm trying to write E2E tests for my UI. In order to login, I'm using auth0 with social login - Github. I have tried several ways to get access token for Github:

  1. Using cypress button clicking:

     cy.visit("https://myapp.io/login");
     cy.get('.auth0-lock-social-button-text').click();
     // Redirect me into Github login page.
     cy.get('#login_field').type(my_username);
     cy.get('#password').type(my_password);
     cy.get('.btn').click();
    

output: url: https://github.com/session

page content: Cookies must be enabled to use GitHub.

  1. Login with cy.request
    This is where I'm stuck. I want to mock the flow of the ui by sending the requests by myself, but I'm not sure how to do it. All the examples I found were with users they manually created in auth0 users manager, and they received the data by passing client_secret and some other params. Thats not what I'm looking for. I'm trying to illustrate the flow as a user see it, or at least the requests that happens behind.

Is someone have example that explains how to do it?

Note: I don't want to use cypress-social-logins because I need it to pass CI.

Thanks.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda