sir-dunxalot / cypress-nextjs-auth0

Cypress commands to support Auth0 and Next.js
60 stars 24 forks source link

Logout causing test flake #36

Closed Tbhesswebber closed 2 years ago

Tbhesswebber commented 2 years ago

Behavior

Occasionally, our test that validates that logging out is working correctly fails because we are randomly getting a 200 status code on a subsequent call to /api/auth/me. We are leveraging the pattern in the Readme of this project for that validation.

Expected behavior

After a call to cy.logout, a request to /api/auth/me should always have a 401 status code.