I am trying to visit a page with a Bearer token, but it does not seem to work. When I use Postman, I am able to visit the page, but if I try to use code it does not.
I tried
cy.visit({
url: '/',
headers: {
authorization: `Bearer ${token}`
}
})
With the authorization. I also tried Cypress.env and setting the localStorage, but none seem to work.