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
- Why does this happen?
`AppwriteException: general_argument_invalid, Invalid `secret` param: Value must be a valid string and at least 1 chars and no longer than 256 chars (400)` the...
- How to properly implement custom domain?...
- Site deployment does not work.
I can change a file, deploy, change does not take effect. Delete file in repo, push changes,deploy. Old file remains undeleted Duplicate file, rename it, push,...