Back

Please help. Getting Error 401

  • 0
  • Self Hosted
  • Web
ponguta_
17 Jul, 2024, 23:10

Hello guys, I'm having a big problem right now.

I have an Appwrite instance in my server, that was using a public ip, I was generating certificates for it using NPM and using Cloudflare as my DNS.

The problem started when my ISP messed up something, and turned my public IP off. So what I did to try to sort out the problem was to create two cloudflare tunnels:

  • One for my Appwrite installation
  • One for my Sveltekit frontend application

The problem is that I cannot loggin anymore into my web app, for some reason I get error 401 when I enter my webapp and when I try to loggin I get:

TypeScript
{
  "message": "User (role: guests) missing scope (account)",
  "code": 401,
  "type": "general_unauthorized_scope",
  "version": "1.5.5"
}

But watching the network tab on browser dev tools I can see I receive the Session Object correctly, I just cant get into the app.

If someone can help me It will be really appreciated.

Edit: By the way, I have tested to:

  • Change CORS policy by changing platforms hostname on appwrite console
  • Use another user
  • Change password from console
TL;DR
Developer's Appwrite instance had a public IP issue, so transitioned to Cloudflare tunnels. Now encountering error 401 while trying to log in, with message stating missing account scope for a guest user. Attempted solutions: changed CORS policy and user, but still facing the issue.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more