Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: Unable to delete authentication method for user within project via Admin Console #7778

Closed
2 tasks done
sam-morin opened this issue Mar 10, 2024 · 2 comments 路 Fixed by appwrite/console#952
Assignees
Labels
bug Something isn't working product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. product / console Console, UI and UX issues

Comments

@sam-morin
Copy link

馃憻 Reproduction steps

  1. Register TOTP authentication method for a user within an application (Org -> Project -> Auth -> User)
  2. Click trash can button to delete TOTP authentication method

馃憤 Expected behavior

My Appwrite Console admin account (across all orgs) would have the sufficient rights/role necessary (users:write) to delete an authentication method that is setup for an end user in one of my orgs.

I can successfully perform all other user administration actions from within the Appwrite console (rename, delete, create, turn off MFA).

馃憥 Actual Behavior

"myemail@myemail.com (role: users) missing scope (users.write)" error is produced

image

I've searched all over the console and cannot find any way/location to change the scope for the role of "users".

This is my main (and only) Appwrite console full admin account.

馃幉 Appwrite version

Different version (specify in environment)

馃捇 Operating system

Linux

馃П Your Environment

Appwrite v1.5.1

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

@sam-morin sam-morin added the bug Something isn't working label Mar 10, 2024
@stnguyen90 stnguyen90 added the product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. label Mar 10, 2024
@stnguyen90
Copy link
Contributor

@sam-morin, thanks for creating this issue! 馃檹馃徏 Let me try to reproduce this.

@stnguyen90 stnguyen90 self-assigned this Mar 10, 2024
@stnguyen90
Copy link
Contributor

I was able to reproduce this and I noticed the HTTP request looked like:

fetch("https://localhost/users/65ee4097cd531eb02fa9/mfa/authenticators/totp", {
  "headers": {
    "accept": "*/*",
    "accept-language": "en-US,en-GB;q=0.9,en;q=0.8",
    "cache-control": "no-cache",
    "content-type": "application/json",
    "pragma": "no-cache",
    "sec-ch-ua": "\"Not_A Brand\";v=\"8\", \"Chromium\";v=\"120\", \"Google Chrome\";v=\"120\"",
    "sec-ch-ua-mobile": "?0",
    "sec-ch-ua-platform": "\"macOS\"",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "same-origin",
    "x-appwrite-project": "console",
    "x-appwrite-response-format": "1.5.0",
    "x-fallback-cookies": "",
    "x-sdk-language": "web",
    "x-sdk-name": "Console",
    "x-sdk-platform": "console",
    "x-sdk-version": "0.6.0"
  },
  "referrer": "https://localhost/console/project-test/auth/user-65ee4097cd531eb02fa9",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{}",
  "method": "DELETE",
  "mode": "cors",
  "credentials": "include"
});

which looks like it's missing the admin mode header 馃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. product / console Console, UI and UX issues
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants