https://cypress.io logo
I guess I can post this - scrubbed of anything sen...
# e2e-testing
s
I guess I can post this - scrubbed of anything sensitive: ```` cy.request({ url : Cypress.env('// scrubbed') + '/oauth/access_token', method : 'POST', body : { username : email, password : password, grant_type : 'password', client_id : // scrubbed, client_secret : // scrubbed, scopes : // scrubbed, }, }).its('body') .then(res => { user = res; }); }); beforeEach(function setUser () { cy.visit('// scrubbed', { onBeforeLoad (win) { win.localStorage.setItem('access_token', user.access_token), win.localStorage.setItem('token_type', user.token_type), win.localStorage.setItem('access_token_expires_at', user.expires_in), win.localStorage.setItem('refresh_token', user.refresh_token), win.localStorage.setItem('scopes', user.scopes); }, }); });`