Skip to content
Back

The current user is not authorized to perform the requested action

  • 0
  • Web
Chirag Aggarwal
30 Nov, 2024, 12:56

my user is logged in via github oauth, but still getting this error

TypeScript
const response = await database.createDocument(
          process.env.NEXT_PUBLIC_APPWRITE_DATABASE_ID!,
          process.env.NEXT_PUBLIC_APPWRITE_COLLECTION_ID!,
          ID.unique(),
          {
            userId: user.current?.$id,
            [field]: value,
          },
        );
        setDocumentId(response.$id);
TL;DR
Developers are experiencing authorization issues and incorrect user count display in a GitHub OAuth setup. The provided code snippet appears to be creating a document, linking it to the current user through their ID. Check if the user has the necessary permissions, and investigate why only one user is being counted.
Chirag Aggarwal
30 Nov, 2024, 12:59

also i have 4 registered users, but its only showing one as the count

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