Cypress - Authentication and Sessions
Examine the following Cypress code snippet for token authentication:
What is the main issue with this code?
cy.request('POST', '/login', { username: 'user', password: 'pass' })
.then(response => {
const token = response.token;
cy.setCookie('auth', token);
});What is the main issue with this code?
