Skip to content

Commit

Permalink
debugging auth for specific user
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisj committed Mar 18, 2024
1 parent 9eb296f commit 666fd84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/neuroglancer/authentication/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ async function authFetchOk(
input: RequestInfo, init?: RequestInit, handleError = true): Promise<Response> {
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');
Expand Down
1 change: 1 addition & 0 deletions src/neuroglancer/authentication/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 666fd84

Please sign in to comment.