diff --git a/examples/for-tests-react-16/src/App.js b/examples/for-tests-react-16/src/App.js index c772bbc9f..fdc197859 100644 --- a/examples/for-tests-react-16/src/App.js +++ b/examples/for-tests-react-16/src/App.js @@ -272,50 +272,52 @@ if (testContext.enableMFA) { ); } -SuperTokens.init({ - usesDynamicLoginMethods: testContext.usesDynamicLoginMethods, - clientType: testContext.clientType, - appInfo: { - appName: "SuperTokens", - websiteDomain: getWebsiteDomain(), - apiDomain: getApiDomain(), - websiteBasePath, - }, - languageTranslations: { - translations: { - en: { - AUTH_PAGE_FOOTER_TOS: "TOS", - }, - hu: { - AUTH_PAGE_FOOTER_TOS: "ÁSZF", +if (!window.location.pathname.startsWith("/mockProvider")) { + SuperTokens.init({ + usesDynamicLoginMethods: testContext.usesDynamicLoginMethods, + clientType: testContext.clientType, + appInfo: { + appName: "SuperTokens", + websiteDomain: getWebsiteDomain(), + apiDomain: getApiDomain(), + websiteBasePath, + }, + languageTranslations: { + translations: { + en: { + AUTH_PAGE_FOOTER_TOS: "TOS", + }, + hu: { + AUTH_PAGE_FOOTER_TOS: "ÁSZF", + }, }, }, - }, - getRedirectionURL: (context) => { - if (context.action === "SUCCESS") { - let logId = { - emailpassword: "EMAIL_PASSWORD", - thirdparty: "THIRD_PARTY", - passwordless: "PASSWORDLESS", - }[context.recipeId]; - - console.log(`ST_LOGS SUPERTOKENS GET_REDIRECTION_URL SUCCESS ${logId}`); - setIsNewUserToStorage(context.recipeId, context.isNewRecipeUser); - if (testContext.disableRedirectionAfterSuccessfulSignInUp) { - return null; + getRedirectionURL: (context) => { + if (context.action === "SUCCESS") { + let logId = { + emailpassword: "EMAIL_PASSWORD", + thirdparty: "THIRD_PARTY", + passwordless: "PASSWORDLESS", + }[context.recipeId]; + + console.log(`ST_LOGS SUPERTOKENS GET_REDIRECTION_URL SUCCESS ${logId}`); + setIsNewUserToStorage(context.recipeId, context.isNewRecipeUser); + if (testContext.disableRedirectionAfterSuccessfulSignInUp) { + return null; + } + return context.redirectToPath || "/dashboard"; + } else { + console.log(`ST_LOGS SUPERTOKENS GET_REDIRECTION_URL ${context.action}`); } - return context.redirectToPath || "/dashboard"; - } else { - console.log(`ST_LOGS SUPERTOKENS GET_REDIRECTION_URL ${context.action}`); - } - }, - useShadowDom, - privacyPolicyLink: "https://supertokens.com/legal/privacy-policy", - termsOfServiceLink: "https://supertokens.com/legal/terms-and-conditions", - defaultToSignUp, - disableAuthRoute: testContext.disableDefaultUI, - recipeList, -}); + }, + useShadowDom, + privacyPolicyLink: "https://supertokens.com/legal/privacy-policy", + termsOfServiceLink: "https://supertokens.com/legal/terms-and-conditions", + defaultToSignUp, + disableAuthRoute: testContext.disableDefaultUI, + recipeList, + }); +} /* App */ function App() { diff --git a/examples/for-tests/src/App.js b/examples/for-tests/src/App.js index 71c1d7ea3..53353cc73 100644 --- a/examples/for-tests/src/App.js +++ b/examples/for-tests/src/App.js @@ -439,55 +439,56 @@ if (testContext.enableMFA) { }) ); } - -SuperTokens.init({ - usesDynamicLoginMethods: testContext.usesDynamicLoginMethods, - clientType: testContext.clientType, - enableDebugLogs: true, - appInfo: { - appName: "SuperTokens", - websiteDomain: getWebsiteDomain(), - apiDomain: getApiDomain(), - websiteBasePath, - }, - languageTranslations: { - translations: { - en: { - AUTH_PAGE_FOOTER_TOS: "TOS", - }, - hu: { - AUTH_PAGE_FOOTER_TOS: "ÁSZF", +if (!window.location.pathname.startsWith("/mockProvider")) { + SuperTokens.init({ + usesDynamicLoginMethods: testContext.usesDynamicLoginMethods, + clientType: testContext.clientType, + enableDebugLogs: true, + appInfo: { + appName: "SuperTokens", + websiteDomain: getWebsiteDomain(), + apiDomain: getApiDomain(), + websiteBasePath, + }, + languageTranslations: { + translations: { + en: { + AUTH_PAGE_FOOTER_TOS: "TOS", + }, + hu: { + AUTH_PAGE_FOOTER_TOS: "ÁSZF", + }, }, }, - }, - getRedirectionURL: (context) => { - if (context.action === "SUCCESS") { - let logId = { - emailpassword: "EMAIL_PASSWORD", - thirdparty: "THIRD_PARTY", - passwordless: "PASSWORDLESS", - thirdpartypasswordless: "THIRDPARTYPASSWORDLESS", - thirdpartyemailpassword: "THIRD_PARTY_EMAIL_PASSWORD", - }[context.recipeId]; - - console.log(`ST_LOGS SUPERTOKENS GET_REDIRECTION_URL SUCCESS ${logId}`); - setIsNewUserToStorage(context.recipeId, context.isNewRecipeUser); - if (testContext.disableRedirectionAfterSuccessfulSignInUp) { - return null; + getRedirectionURL: (context) => { + if (context.action === "SUCCESS") { + let logId = { + emailpassword: "EMAIL_PASSWORD", + thirdparty: "THIRD_PARTY", + passwordless: "PASSWORDLESS", + thirdpartypasswordless: "THIRDPARTYPASSWORDLESS", + thirdpartyemailpassword: "THIRD_PARTY_EMAIL_PASSWORD", + }[context.recipeId]; + + console.log(`ST_LOGS SUPERTOKENS GET_REDIRECTION_URL SUCCESS ${logId}`); + setIsNewUserToStorage(context.recipeId, context.isNewRecipeUser); + if (testContext.disableRedirectionAfterSuccessfulSignInUp) { + return null; + } + console.log(JSON.stringify(context)); + return context.redirectToPath || "/dashboard"; + } else { + console.log(`ST_LOGS SUPERTOKENS GET_REDIRECTION_URL ${context.action}`); } - console.log(JSON.stringify(context)); - return context.redirectToPath || "/dashboard"; - } else { - console.log(`ST_LOGS SUPERTOKENS GET_REDIRECTION_URL ${context.action}`); - } - }, - useShadowDom, - privacyPolicyLink: "https://supertokens.com/legal/privacy-policy", - termsOfServiceLink: "https://supertokens.com/legal/terms-and-conditions", - defaultToSignUp, - disableAuthRoute: testContext.disableDefaultUI, - recipeList, -}); + }, + useShadowDom, + privacyPolicyLink: "https://supertokens.com/legal/privacy-policy", + termsOfServiceLink: "https://supertokens.com/legal/terms-and-conditions", + defaultToSignUp, + disableAuthRoute: testContext.disableDefaultUI, + recipeList, + }); +} /* App */ function App() { diff --git a/test/end-to-end/generalerror.test.js b/test/end-to-end/generalerror.test.js index 1100c0150..228472f4a 100644 --- a/test/end-to-end/generalerror.test.js +++ b/test/end-to-end/generalerror.test.js @@ -37,7 +37,7 @@ import { assertProviders, clickOnProviderButton, clickOnProviderButtonWithoutWaiting, - loginWithAuth0, + loginWithMockProvider, isGeneralErrorSupported, setGeneralErrorToLocalStorage, backendBeforeEach, @@ -403,7 +403,7 @@ function getThirdPartyTests(rid, ridForStorage) { await assertProviders(page); let [_, response1] = await Promise.all([ - clickOnProviderButtonWithoutWaiting(page, "Auth0"), + clickOnProviderButtonWithoutWaiting(page, "Mock Provider"), page.waitForResponse( (response) => response.url().includes(GET_AUTH_URL_API) && @@ -428,10 +428,10 @@ function getThirdPartyTests(rid, ridForStorage) { await page.goto(`${TEST_CLIENT_BASE_URL}/auth`); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); let [_, response1] = await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); diff --git a/test/end-to-end/getRedirectionURL.test.js b/test/end-to-end/getRedirectionURL.test.js index f491f7ad9..77efb1cf4 100644 --- a/test/end-to-end/getRedirectionURL.test.js +++ b/test/end-to-end/getRedirectionURL.test.js @@ -7,7 +7,7 @@ import { screenshotOnFailure, assertProviders, clickOnProviderButton, - loginWithAuth0, + loginWithMockProvider, setPasswordlessFlowType, waitForSTElement, getPasswordlessDevice, @@ -114,9 +114,9 @@ describe("getRedirectionURL Tests", function () { page.waitForNavigation({ waitUntil: "networkidle0" }), ]); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); const newUserCheck = await page.evaluate(() => localStorage.getItem("isNewUserCheck")); @@ -170,9 +170,9 @@ describe("getRedirectionURL Tests", function () { it("Test that isNewRecipeUser works correctly when signing up with auth 0", async function () { await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); const newUserCheck = await page.evaluate(() => localStorage.getItem("isNewUserCheck")); @@ -354,9 +354,9 @@ describe("getRedirectionURL Tests", function () { page.waitForNavigation({ waitUntil: "networkidle0" }), ]); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); const newUserCheck = await page.evaluate(() => localStorage.getItem("isNewUserCheck")); @@ -642,10 +642,10 @@ describe("getRedirectionURL Tests", function () { ]); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse( (response) => response.url() === SIGN_IN_UP_API && response.status() === 200 ), @@ -654,7 +654,7 @@ describe("getRedirectionURL Tests", function () { const urlAfterSignUp = await page.url(); const newUserCheck = await page.evaluate(() => localStorage.getItem("isNewUserCheck")); assert.equal(newUserCheck, "thirdparty-true"); - assert(urlAfterSignUp.includes("/auth/callback/auth0")); + assert(urlAfterSignUp.includes("/auth/callback/mock-provider")); }); }); }); diff --git a/test/end-to-end/multitenancy.dynamic_login_methods.test.js b/test/end-to-end/multitenancy.dynamic_login_methods.test.js index 6364161fd..303235eb9 100644 --- a/test/end-to-end/multitenancy.dynamic_login_methods.test.js +++ b/test/end-to-end/multitenancy.dynamic_login_methods.test.js @@ -34,13 +34,14 @@ import { loginWithGoogle, clearBrowserCookiesWithoutAffectingConsole, clickOnProviderButton, - loginWithAuth0, + loginWithMockProvider, isMultitenancySupported, isMultitenancyManagementEndpointsSupported, setupTenant, backendBeforeEach, getTextByDataSupertokens, setupBrowser, + loginWithAuth0, } from "../helpers"; import { TEST_CLIENT_BASE_URL, diff --git a/test/end-to-end/thirdparty.test.js b/test/end-to-end/thirdparty.test.js index 49411419b..0a2d131ef 100644 --- a/test/end-to-end/thirdparty.test.js +++ b/test/end-to-end/thirdparty.test.js @@ -26,7 +26,7 @@ import { assertNoSTComponents, generateState, clickOnProviderButton, - loginWithAuth0, + loginWithMockProvider, getGeneralError, waitFor, screenshotOnFailure, @@ -34,6 +34,7 @@ import { backendBeforeEach, waitForUrl, setupBrowser, + loginWithAuth0, } from "../helpers"; import { TEST_CLIENT_BASE_URL, TEST_SERVER_BASE_URL, SIGN_IN_UP_API, GET_AUTH_URL_API } from "../constants"; @@ -137,37 +138,37 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs, ]); }); - it("Successful sign in with Auth0 with redirectToPath (w/ leading slash) keeping query params", async function () { + it("Successful sign in with redirectToPath (w/ leading slash) keeping query params", async function () { await Promise.all([ page.goto(`${TEST_CLIENT_BASE_URL}/auth?redirectToPath=%2Fredirect-here%3Ffoo%3Dbar`), page.waitForNavigation({ waitUntil: "networkidle0" }), ]); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); const { pathname, search } = await page.evaluate(() => window.location); assert.deepStrictEqual(pathname + search, "/redirect-here?foo=bar"); }); - it("Successful sign in with Auth0 with redirectToPath (w/o leading slash) keeping query params", async function () { + it("Successful sign in with SSO with redirectToPath (w/o leading slash) keeping query params", async function () { await Promise.all([ page.goto(`${TEST_CLIENT_BASE_URL}/auth?redirectToPath=%3Ffoo%3Dbar`), page.waitForNavigation({ waitUntil: "networkidle0" }), ]); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); const { pathname, search } = await page.evaluate(() => window.location); assert.deepStrictEqual(pathname + search, "/?foo=bar"); }); - it("Successful sign in with Auth0 with redirectToPath (query params + fragment)", async function () { + it("Successful sign in with SSO with redirectToPath (query params + fragment)", async function () { await Promise.all([ page.goto( `${TEST_CLIENT_BASE_URL}/auth?redirectToPath=${encodeURIComponent( @@ -177,39 +178,39 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs, page.waitForNavigation({ waitUntil: "networkidle0" }), ]); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); const { pathname, search, hash } = await page.evaluate(() => window.location); assert.deepStrictEqual(pathname + search + hash, "/redirect-here?foo=bar#cell=4,1-6,2"); }); - it("Successful sign in with Auth0 with redirectToPath (only fragment)", async function () { + it("Successful sign in with SSO with redirectToPath (only fragment)", async function () { await Promise.all([ page.goto(`${TEST_CLIENT_BASE_URL}/auth?redirectToPath=${encodeURIComponent("#cell=4,1-6,2")}`), page.waitForNavigation({ waitUntil: "networkidle0" }), ]); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); const { pathname, search, hash } = await page.evaluate(() => window.location); assert.deepStrictEqual(pathname + search + hash, "/#cell=4,1-6,2"); }); - it("Successful signin with Auth0 and email verification", async function () { + it("Successful signin with SSO and email verification", async function () { await Promise.all([ page.goto(`${TEST_CLIENT_BASE_URL}/auth?mode=REQUIRED`), page.waitForNavigation({ waitUntil: "networkidle0" }), ]); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); await page.waitForSelector(".sessionInfo-user-id"); @@ -241,29 +242,29 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs, ]); }); - it("Successful signin with auth0 and redirectToPath", async function () { + it("Successful signin with SSO and redirectToPath", async function () { await Promise.all([ page.goto(`${TEST_CLIENT_BASE_URL}/auth?redirectToPath=/hello`), page.waitForNavigation({ waitUntil: "networkidle0" }), ]); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); await waitForUrl(page, "/hello"); }); - it("Successful signin with auth0 and redirectToPath case sensitive", async function () { + it("Successful signin with SSO and redirectToPath case sensitive", async function () { await Promise.all([ page.goto(`${TEST_CLIENT_BASE_URL}/auth?redirectToPath=%2FCasE%2FCase-SensItive1-PAth`), page.waitForNavigation({ waitUntil: "networkidle0" }), ]); await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); await waitForUrl(page, "/CasE/Case-SensItive1-PAth"); @@ -354,8 +355,8 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs, } }; page.on("request", requestHandler); - await clickOnProviderButton(page, "Auth0"); - await loginWithAuth0(page); + await clickOnProviderButton(page, "Mock Provider"); + await loginWithMockProvider(page); const error = await getGeneralError(page); assert.deepStrictEqual(error, "TOS"); }); @@ -390,8 +391,8 @@ export function getThirdPartyTestCases({ authRecipe, rid, signInUpPageLoadLogs, }; page.on("request", requestHandler); - await clickOnProviderButton(page, "Auth0"); - await loginWithAuth0(page); + await clickOnProviderButton(page, "Mock Provider"); + await loginWithMockProvider(page); const error = await getGeneralError(page); assert.deepStrictEqual(error, "Test message!!!!"); diff --git a/test/end-to-end/thirdpartyemailpassword.test.js b/test/end-to-end/thirdpartyemailpassword.test.js index fb4bdef59..d4a9660a3 100644 --- a/test/end-to-end/thirdpartyemailpassword.test.js +++ b/test/end-to-end/thirdpartyemailpassword.test.js @@ -29,7 +29,7 @@ import { getLogoutButton, signUp, toggleSignInSignUp, - loginWithAuth0, + loginWithMockProvider, getLoginWithRedirectToSignIn, getLoginWithRedirectToSignUp, getAuthPageHeaderText, @@ -284,11 +284,11 @@ describe("SuperTokens Third Party Email Password", function () { await waitForSTElement(page, "[data-supertokens~=generalError]", true); }); - it("Successful signin/up with auth0", async function () { + it("Successful signin/up", async function () { await assertProviders(page); - await clickOnProviderButton(page, "Auth0"); + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); await page.waitForSelector(".sessionInfo-user-id"); @@ -339,10 +339,10 @@ describe("SuperTokens Third Party Email Password", function () { await Promise.all([await logoutButton.click(), page.waitForNavigation({ waitUntil: "networkidle0" })]); await waitForUrl(page, "/auth"); - // 2. Sign in with auth0 with same address. - await clickOnProviderButton(page, "Auth0"); + // 2. Sign in with SSO with same address. + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); await waitForUrl(page, "/dashboard"); diff --git a/test/end-to-end/thirdpartypasswordless.test.js b/test/end-to-end/thirdpartypasswordless.test.js index d97f74d34..36e0376eb 100644 --- a/test/end-to-end/thirdpartypasswordless.test.js +++ b/test/end-to-end/thirdpartypasswordless.test.js @@ -24,7 +24,7 @@ import { clickOnProviderButton, getUserIdWithFetch, getLogoutButton, - loginWithAuth0, + loginWithMockProvider, setInputValues, submitForm, waitForSTElement, @@ -139,10 +139,10 @@ describe("SuperTokens Third Party Passwordless", function () { await waitForSTElement(page, `input[name=email]`); - // 3. Sign in with auth0 with same address. - await clickOnProviderButton(page, "Auth0"); + // 3. Sign in with SSO with same address. + await clickOnProviderButton(page, "Mock Provider"); await Promise.all([ - loginWithAuth0(page), + loginWithMockProvider(page), page.waitForResponse((response) => response.url() === SIGN_IN_UP_API && response.status() === 200), ]); await Promise.all([page.waitForSelector(".sessionInfo-user-id"), page.waitForNetworkIdle()]); diff --git a/test/end-to-end/thirdpartypasswordless.tp.test.js b/test/end-to-end/thirdpartypasswordless.tp.test.js index c0cb7f139..4d919cde0 100644 --- a/test/end-to-end/thirdpartypasswordless.tp.test.js +++ b/test/end-to-end/thirdpartypasswordless.tp.test.js @@ -24,7 +24,7 @@ import { clickOnProviderButton, getUserIdWithFetch, getLogoutButton, - loginWithAuth0, + loginWithMockProvider, setInputValues, submitForm, waitForSTElement, diff --git a/test/end-to-end/userContext.test.js b/test/end-to-end/userContext.test.js index 2a5e120f8..91b6a16e7 100644 --- a/test/end-to-end/userContext.test.js +++ b/test/end-to-end/userContext.test.js @@ -23,10 +23,11 @@ import { submitFormReturnRequestAndResponse, assertProviders, clickOnProviderButton, - loginWithAuth0, + loginWithMockProvider, backendBeforeEach, waitForUrl, setupBrowser, + loginWithAuth0, } from "../helpers"; import { TEST_CLIENT_BASE_URL, diff --git a/test/helpers.js b/test/helpers.js index c9ddfeb08..2473c15a1 100644 --- a/test/helpers.js +++ b/test/helpers.js @@ -624,6 +624,23 @@ export async function loginWithFacebook(page) { await Promise.all([page.keyboard.press("Enter"), page.waitForNavigation({ waitUntil: "networkidle0" })]); } +export async function loginWithMockProvider( + page, + email = "st_test_user@supertokens.io", + userId = "123", + isVerified = true +) { + const url = new URL(page.url()); + await Promise.all([ + page.goto( + `${TEST_CLIENT_BASE_URL}/auth/callback/mock-provider?code=asdf&email=${encodeURIComponent( + email + )}&userId=${encodeURIComponent(userId)}&isVerified=${isVerified}&state=${url.searchParams.get("state")}` + ), + page.waitForNavigation({ waitUntil: "networkidle0" }), + ]); +} + export async function loginWithAuth0(page) { await page.focus("input[type=email]"); await page.keyboard.type(process.env.AUTH0_EMAIL);