simulacrum icon indicating copy to clipboard operation
simulacrum copied to clipboard

Can't authorize through auth0 in a backstage app by using Cypress and auth0 simulation

Open wKich opened this issue 4 years ago • 2 comments
trafficstars

For some reason, the authorization through auth0 simulation doesn't work in tests with Cypress.

wKich avatar Oct 07 '21 19:10 wKich

We tried to investigate it and used different suggestions to find the source of the problem. I don't know well auth0, so @dagda1 could you please correct me if said something wrong.

From all discussions, I noticed that there are a couple of possible sources of that problem:

  • The backstage using some old way to authorize by opening a new window instead of creating an iframe
  • Cypress uses its own SSL certificate, so the token couldn't be set

wKich avatar Oct 07 '21 20:10 wKich

@wKich it is very weird. we've used it in other repos that did not use the new window approach without these problems.

the new window seems to be causing problems. i think in general we need lots of logging throughout simulacrum that you can turn off and on so we can debug easier.

i have a pr PR that logs each express request

dagda1 avatar Oct 07 '21 20:10 dagda1