From d75931be3426058a763736cd954b0d10da2e1588 Mon Sep 17 00:00:00 2001 From: Mihaly Lengyel Date: Wed, 18 Dec 2024 00:31:01 +0100 Subject: [PATCH] feat: experiment with forceRefresh to use in impersonation --- lib/build/oauth2providerprebuiltui.js | 4 ++-- .../components/features/tryRefreshPage/index.tsx | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/build/oauth2providerprebuiltui.js b/lib/build/oauth2providerprebuiltui.js index 7b1ec4e08..445134aa0 100644 --- a/lib/build/oauth2providerprebuiltui.js +++ b/lib/build/oauth2providerprebuiltui.js @@ -367,14 +367,14 @@ var TryRefreshPage$1 = function (props) { return genericComponentOverrideContext.__generator(this, function (_a) { switch (_a.label) { case 0: - console.log("forceRefresh", forceRefresh); + document.cookie = + "st-last-access-token-update=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; if (!forceRefresh) return [3 /*break*/, 2]; return [4 /*yield*/, session.attemptRefreshingSession()]; case 1: _a.sent(); _a.label = 2; case 2: - console.log("loginChallenge", loginChallenge); if (!loginChallenge) return [3 /*break*/, 4]; return [ 4 /*yield*/, diff --git a/lib/ts/recipe/oauth2provider/components/features/tryRefreshPage/index.tsx b/lib/ts/recipe/oauth2provider/components/features/tryRefreshPage/index.tsx index 96da3b417..c5f0479e2 100644 --- a/lib/ts/recipe/oauth2provider/components/features/tryRefreshPage/index.tsx +++ b/lib/ts/recipe/oauth2provider/components/features/tryRefreshPage/index.tsx @@ -51,11 +51,10 @@ export const TryRefreshPage: React.FC = (props) => { React.useEffect(() => { if (sessionContext.loading === false) { (async function () { - console.log("forceRefresh", forceRefresh); + document.cookie = "st-last-access-token-update=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; if (forceRefresh) { await attemptRefreshingSession(); } - console.log("loginChallenge", loginChallenge); if (loginChallenge) { const { frontendRedirectTo } = await props.recipe.webJSRecipe.getRedirectURLToContinueOAuthFlow({ loginChallenge,