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
- User columns stuck on processing
Hi — on Appwrite Cloud (Free), Project ID 69d7dd8200098ed8560c, database mylestone-db. Attributes/columns are stuck in "processing" indefinitely across two coll...
- [SOLVED] Error upgrading from 1.8.1 to 1...
DO Self-hosted server failed to upgrade with this error "Error response from daemon: client version 1.52 is too new. Maximum supported API version is 1.42". U...
- MariaDB refuses to connect to appwrite
Earlier, I tried updating my Appwrite version from 18.1.x to the latest release because my Flutter package required it to function properly. I used the official...