Back

[SOLVED] AppwriteException: User (role: guests) missing scope (account)

  • 0
  • Teams
  • Accounts
  • Web
Susmita
8 Jun, 2023, 11:33

I have been trying to authenticate the user with an email session but I am getting this error ehen a user is trying to sign up.

TL;DR
The user is getting an AppwriteException when trying to authenticate with an email session. They added email verification logic, but it caused the bug. They are redirecting to '/login' to hide the bug. They want to remove the error and send email verification after signing up. It is suggested to use the `account.get()` in the middle of the process to create the user session before proceeding with other actions.
Susmita
8 Jun, 2023, 11:34

I just tried to add email verification logic and this bug came up

Susmita
8 Jun, 2023, 12:50

Someone help me with this issue

Binyamin
8 Jun, 2023, 12:52

In what part of your code you're facing the error?

Susmita
8 Jun, 2023, 12:52

As of now I've added router.push('/login') to redirect after a user sign up. Just done this to hide the bug

Susmita
8 Jun, 2023, 12:53

But it should be there as I want to do email verification when a user sign up

Susmita
8 Jun, 2023, 12:53

then get access to other pages

Susmita
8 Jun, 2023, 12:55

So, I put the verification logic there and tried to sign up as a new user but it showed up this error and didn't send any email for verification or anything to me other than the error along with signed up successfully message

Susmita
8 Jun, 2023, 12:55

First, I don't want this error to show up and second I want to send the email verification

Binyamin
8 Jun, 2023, 12:57

I see.

Binyamin
8 Jun, 2023, 12:58

I think, that in the middle of the process you'll need to use the account.get() in between

Binyamin
8 Jun, 2023, 12:58

To create the user session before moving to other user actions.

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