From 666fd8481d35f3cf47659e22f9daa2245162aeb8 Mon Sep 17 00:00:00 2001 From: Chris Jordan Date: Mon, 18 Mar 2024 18:23:09 -0400 Subject: [PATCH] debugging auth for specific user --- src/neuroglancer/authentication/base.ts | 2 ++ src/neuroglancer/authentication/frontend.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/neuroglancer/authentication/base.ts b/src/neuroglancer/authentication/base.ts index b06cefde3..2d419d036 100644 --- a/src/neuroglancer/authentication/base.ts +++ b/src/neuroglancer/authentication/base.ts @@ -62,6 +62,8 @@ async function authFetchOk( input: RequestInfo, init?: RequestInit, handleError = true): Promise { try { const res = await fetch(input, init); + alert(`authFetchOk status ${res.status}`); + console.log("authFetchOk status", res.status); if (res.status === 400 || res.status === 401) { const wwwAuth = res.headers.get('WWW-Authenticate'); diff --git a/src/neuroglancer/authentication/frontend.ts b/src/neuroglancer/authentication/frontend.ts index fe66a45eb..8ee424602 100644 --- a/src/neuroglancer/authentication/frontend.ts +++ b/src/neuroglancer/authentication/frontend.ts @@ -30,6 +30,7 @@ function openPopupCenter(url: string, width: number, height: number) { // generate a token with the neuroglancer-auth service using google oauth2 async function authorize(auth_url: string) { + alert(`we are trying to open a popup! ${auth_url}`); const auth_popup = openPopupCenter( `${auth_url}?redirect=${encodeURI(window.location.origin + '/auth_redirect.html')}`, 400, 650);