In the Server-Side Rendering Astro template, I'm currently trying to get it to work where the user can update their account.
I've added an input field where they can update their name, but when submitting it, I get the following error:
TypeScript
02:53:01 [watch] src/pages/account.astro
02:53:03 [ERROR] app.67de538f000787f352da@service.localhost (role: applications) missing scope (account)
Stack trace:
at Client.call (/home/korbs/demos-for-astro/server-side-rendering/node_modules/node-appwrite/lib/client.js:206:15)
[...] See full stack trace in the browser, or rerun with --verbose.
The following code was added to `src/pages/account.astro`: ```jsx
... if (Astro.request.method === "POST") { const data = await Astro.request.formData(); const name = data.get("name") as string; const { account } = createAdminClient(); await account.updateName(name); return Astro.redirect("/account?=username_updated"); } ...
...
<section> <p>Change name:</p> <form method="POST"> <input style="background: #1c1c21;border: 1px #2c2c30 solid;padding: 6px 12px;border-radius: 6px;" id="name" name="name"/> <button class="button is-secondary is-full-width" type="submit">Update Username</button> </form> </section> ... ```The API key I used as access to all scopes.
TL;DR
Developers are encountering a missing scope (account) error when trying to update a user's account name in the Astro template. The issue lies in the API key lacking necessary permissions. To solve this, ensure the API key has access to the 'account' scope.Recommended threads
- It says domain already used but I have d...
I accidentally deleted the project in which I used my domain originally (orexia.app) from name.com. Now I am trying to add it to a different project and it says...
- Is this normal in the self host custom d...
when i try to add custom domain to the project did not see this in 1.8.0 ok when pressed the retry it says "DNS verification failed with resolver 8.8.8.8. Domai...
- No server error on selfhosted appwrite
Please help me, my clients is ask what happen on their data? How can i make it up again?