In Cypress, set a token in localStorage before test

后端 未结 5 2008
滥情空心
滥情空心 2021-01-31 15:35

I want to login and set a localStorage token on the client (specifically jwt)

How can I accomplish this using cy.request, as suggested in the C

5条回答
  •  时光说笑
    2021-01-31 16:20

    I think that title should be updated for this topic. JWT token is main potin for this discussion!

    The main question was about JWT token but in general, all modern applications are using OIDC Microsoft article - v2-protocols-oidc / ADAL and here is a very tricky situation to get an access using just generating tokens by API call. I found here that and will check it with my app. But be sure that you are cool in JS and have good assistance from your DevTeam ;)

提交回复
热议问题