hi, I am always getting this error when using OAuth google login to check if user is logged in or not.
Workflow: I have this authContext function which in useEffect/useLayoutEffect gets current session and loads user's google profile if logged in else redirects to /login page. When a user is logged in, it works fine else it throws this exception (see title).
I have tried both account.get and account.getSession('current') and still gets the same exception when user is not logged in. This doesn't only happen in useEffect or useLayoutEffect on button to get session (just for testing) and its same.
useLayoutEffect(() => {
getLoggedInGoogleUser();
}, []);
const getLoggedInGoogleUser = async () => {
try {
const hey = await account.getSession("current");
if (hey) console.log(hey);
} catch (error) {
console.log(error);
}
};
please help getting around this error.
thank you, best regards.
Recommended threads
- Login / Signup issue
So I have been trying to create an account on appwrite but no matter what I try it doesn't work. I tried using GitHub at first but after logging in it just red...
- I can't UNPAUSE my project with the free...
I received an email notifying me that my project had been paused due to inactivity, and the email included a link to "Restore project." However, that button red...
- How to bypass the rate limit on the back...
Once a month my app has a ton of usage and I always run into the Too many requests 429 error. I am trying to optimize the queues and jobs to manage that, but a...