authelia/test/helpers/behaviors/RegisterAndLoginTwoFactor.ts
2019-03-03 11:39:40 +01:00

13 lines
433 B
TypeScript

import { WebDriver } from "selenium-webdriver";
import LoginAndRegisterTotp from "../LoginAndRegisterTotp";
import FullLogin from "../FullLogin";
export default async function(
driver: WebDriver,
username: string,
email: boolean = false,
targetUrl: string = "https://login.example.com:8080/") {
const secret = await LoginAndRegisterTotp(driver, username, email);
await FullLogin(driver, username, secret, targetUrl);
};