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
- Function issue
Hi,idk whats wrong with my function but i made some changes to the env var and made sure they saved then i redeployed it,but then after it redeeployed it asked ...
- Can't resume paused project
I have logged in in incognito, done the email verification and still get the invalid fingerprint error. What's the issue.
- I am currently seeking opportunities as ...
Hey! 👋 I'm a Shopify guy. Been building stores for 8+ years. Still haven't lost my mind. Barely. I make stores that don't suck fast, smooth, and actually built...