Rank 3: Container
Hello! I am trying to make the user log out but its not working. Here is the error I am getting:
This is the code for the logout:
async function logout() { if (isLoggedin) { try { await appwriteUser.deleteSession('current'); } catch (error) { console.error('Failed to logout:', error); } } else { console.error('User is not logged in'); } }I also need help with teams... I want the user to join a team as soon as they log in:
here is the code:
await appwriteUser.create(ID.unique(), email, password, name).then(async () => { await appwriteTeams.createMembership( 'Teachers', email )yet this dcoes not work. please help!