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 :
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);
}
};
[SOLVED] (role: applications) missing scope (account)
Hey @kyuri How did you reolve this?
Recommended threads
- Invalid origin error in authentication
I have setup the package name same as the package name in app.json but it is constantly saying `AppwriteException: Invalid Origin. Register your new client as ...
- Problem with Google Workspace at DNS Rec...
Hello, I bought a domain at Namecheap, and Google Workspace used to work there, but now that I switched from Custom DNS to Appwrite's nameservers, it doesn't w...
- Flutter OAuth2 webAuth Bug?
I created with flutter an app where I can login in with my Microsoft Account. When I compile it to Web (WASM) or Android (aab) then there is no problem what so ...