kyuriOriginal post
Web Developer
I'm using nextJS and SSR, i'm attempting to clear the cookie of the user and delete the sessions on appwrite but I get the error attached.
I'll provide my endpoint for this and the snippet used on the dashboard along with my appwrite.js file.
Would like to know whats causing this as I know my API key has all the permissions I need and it is valid.
dashboard snippet :
JavaScript
const handleLogout = async () => { try { const response = await fetch('/api/auth/', { method: 'DELETE' }); if (response.ok) { router.push('/login'); } else { throw new Error('Logout failed'); } } catch (error) { console.error("Logout failed:", error); setError(error.message); } };Summary
Developers encountered the error "[SOLVED] (role: applications) missing scope (account)" while using nextJS and SSR, trying to clear cookies and delete sessions on Appwrite. The issue was resolved by ensuring the API key had the necessary permissions. The provided dashboard snippet shows how the logout functionality was implemented.