
other things working well, but my delete isn't working :
deleteAccount: async (password: string) => { try { // First, delete all active sessions try { const sessions = await account.listSessions(); for (const session of sessions.sessions) { await account.deleteSession(session.$id); } } catch (error) { console.log('No sessions to delete'); }
// Verify credentials by creating a temporary session
const user = await account.get();
await account.createEmailPasswordSession(user.email, password);
// Now delete the account
await account.delete();
return true;
} catch (error) {
console.error('Delete account error:', error);
throw error;
}
},

whats the error?

(NOBRIDGE) ERROR Delete account error: [AppwriteException: User (role: guests) missing scope (account)]

@Darshan Pandya

i think when you delete all the sessions, the get call fails and might be the one throwing an error.

when i remove that i get Delete account error: [AppwriteException: Creation of a session is prohibited when a session is active.]
Recommended threads
- Set succes/failure url in console
Hi guys, I want to set up a succes and failure url for my OAuth2 provider Google. But I don't see any options for this? Is it not possible to do so? Beside th...
- Expo react native error
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'PlatformConstants' could not be found. Verify that a module by this name is registered in the nativ...
- Appwrite Error: 401 Unauthorized on getC...
Hi everyone, I'm getting an error while trying to fetch the current user using Appwrite in my React project. Here's the error log: auth.js:41 GET https://fra....
