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
- 1:1 relationship doesn’t sync after re-a...
Hi, I’m trying to use a two-way one-to-one relationship. It works fine when I create a record with the relationship set, and it also works when I unset it. But ...
- Upsert with setting permissions
Hi there, I am using self-hosted appwrite v1.7.4 and trying to use the bulk update stuff that was released with 1.7.x. Unfortunally I found that there is an ser...
- Github connection error - Self Hosted Ap...
I am trying to connect my github account to deploy a project to sites, but Connect to Gtihub button is disabled. I have configured all Env variables needed for...