I am implementing an account deletion feature to allow users to delete their own account.
I have made sure to delete the associated data from the user (i.e. user profile data which is on a collection). The user is logged in and has an active session.
When requesting the userDelete process, I get a permissions error:
"message": "[user's email address] (role: users) missing scope (users.write)"
How can I update user permissions to make sure users are able to delete their own account?
I have a user_profile collection, and from my appwrite.json file I have the following permissions on it: "$permissions": ["create(\"users\")", "read(\"guests\")", "update(\"users\")", "write(\"users\")"],
I don't think this is related to the user/auth permissions though. Is there a way to set user/auth permissions to users ?
This is the GraphQL query I am running:
const authUserDeleteResponse = await graphql.mutation({
query: `
mutation DeleteAuthUser(
$userId: String!
) {
usersDelete(userId: $userId) {
status
}
}
`,
variables: {
userId
}
});
Recommended threads
- How to disable appwrite/embedding from s...
Hi everyone! I'm currently running a self-hosted instance of Appwrite. For my current use case, I don't need the AI/embedding features, and I noticed the `app...
- Invalid type for attribute 'email': emai...
I'm using the node-appwrite SDK to create a table, the column payload looks like this: ```json [{"key":"email","type":"email","required":true, "size": 512}] ``...
- Git connection is not working anymore on...
Hello all, I updated from 1.8.1 to 1.9.0 then 1.9.5. All seems to work even the Github connection. In Git configuration I see my Github user but when trying to...