Skip to content

Commit

Permalink
Temporarily added prod debugging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
Aokijiop committed Sep 12, 2024
1 parent 1b4f17a commit f107b8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/auth_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,13 @@ const logInWithEmailAndPassword = async (email, password, redirectPath, navigate
throw new Error('Please verify your email before logging in.');
}
cookies.set(cookieKeys.ACCESS_TOKEN, auth.currentUser.accessToken, cookieConfig);

console.log("Auth object");
console.log(auth);
//GET req to NPOBackend based on user identity from firebase
const user = await NPOBackend.get(`/users/${auth.currentUser.uid}`);
//if approved status is false, tell user to wait for approval
console.log("Look here");
console.log(user);
if (!user.data[0].approved) {
throw new Error('Your account is currently under review. Please wait for approval.');
}
Expand Down

0 comments on commit f107b8b

Please sign in to comment.