Skip to content

Instantly share code, notes, and snippets.

@ndavis
ndavis / oktaLogin.js
Created November 7, 2019 03:38
Cypress Custom Command for Okta Login
Cypress.Commands.add('loginOkta', () => {
const optionsSessionToken = {
method: 'POST',
url: Cypress.env('session_token_url'),
body: {
username: Cypress.env('username'),
password: Cypress.env('password'),
options: {
warnBeforePasswordExpired: 'true'
}