Changed
Releases 0.1.2
Useful for End to End testing.
Below example with CypressIO
Cypress.Commands.add("loginSSO", (overrides = {}) => {
Cypress.log({
"name": "loginSSO",
});
if(!getAccessToken()) {
exchangeToken(CLIENT_ID, REFRESH_TOKEN, CLIENT_SECRET) // <---- new function
.then(_ => {
cy.request({
method: 'GET',
url: `${API_URL}/staff`,
headers: createOAuthHeaders(),
});
});
}
});