
I am working on an app with a cohort team and we are using createEmailPasswordSession ... all of this is being run in nextJs via a context provider.
useEffect(() => {
const getSession = async () => {
try {
await account.getSession('current');
console.log('User is signed in');
} catch (error) {
console.log(error);
}
};
getSession();
}, []);
this is great if a session exists. but if it doesn't it returns an error ... is there a better way to check if a session exists.
goal is on page loads to route user to a dashboard or not based on if they are logged in.
Recommended threads
- Unable to create push providers - FCM or...
Currently unable to create a push provider for FCM or APNS.... https://github.com/appwrite/console/issues/2045 When uploading a file... FCM = Valid file retu...
- Stuck in "deleting"
my parent element have relationship that doesnt exist and its stuck in "deleting", i cant delete it gives me error: Collection with the requested ID could not b...
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
