Skip to content
Back

[SOLVED] (role: applications) missing scope (account)

  • 1
  • Auth
  • Web
kyuri
27 Sep, 2024, 18:04

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 :

TypeScript

  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);
    }
  };
TL;DR
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.
kyuri
27 Sep, 2024, 18:52

[SOLVED] (role: applications) missing scope (account)

Kk
12 Nov, 2024, 07:31

Hey @kyuri How did you reolve this?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more