Skip to content

Commit

Permalink
adding console output. not sure why the system isn't letting me login…
Browse files Browse the repository at this point in the history
… all of a sudden
  • Loading branch information
siddheshraze committed Feb 28, 2025
1 parent 7f83d4d commit ec63caf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,19 @@ export const { auth, handlers, signIn, signOut } = NextAuth({
return false; // No email, reject sign-in
}
const coreURL = `${process.env.AUTH_URL}/api/customsignin?email=${encodeURIComponent(userEmail)}`;
console.log('extracted core url: ', coreURL);
try {
const response = await fetch(coreURL, {
method: 'GET'
});

console.log('response: ', response);
if (!response.ok) {
console.log('response not okay');
return false;
}

const data = await response.json();
console.log('signin api returned data: ', data);
user.userStatus = data.userStatus;
user.sites = data.allowedSites;
user.allsites = data.allSites;
Expand Down

0 comments on commit ec63caf

Please sign in to comment.