Back

User (role: guests) missing scope (account) --still occurring

  • 0
  • Cloud
Christy Jacob
23 Dec, 2023, 12:09

Only then you'll be able to make authenticated requests

TL;DR
User (role: guests) is missing a scope (account) and is still experiencing issues. They are unsure about client-side vs server-side execution. The code provided seems to be for signing in an account. The solution suggested is to check the Appwrite documentation for creating sessions and review the quick start guide for registering and logging in. The user is recommended to use a web framework and can refer to the provided quick starts for guidance. Only after setting up authentication will they be able to make authenticated requests.
jasonetorres (class 23)
23 Dec, 2023, 12:13

the only endpoint I rmember calling was in my config files

jasonetorres (class 23)
23 Dec, 2023, 12:13

sorry this is a little out of my wheelhouse lol

Christy Jacob
23 Dec, 2023, 12:15

Which framework are you using

jasonetorres (class 23)
23 Dec, 2023, 12:15

TS

Christy Jacob
23 Dec, 2023, 12:16

Which web framework though

Christy Jacob
23 Dec, 2023, 12:19

I can point you to one of our quick starts and it'll give you an idea of how to get a registration / login page working

Christy Jacob
23 Dec, 2023, 12:19
Christy Jacob
23 Dec, 2023, 12:20

You can pick the framework your using

jasonetorres (class 23)
23 Dec, 2023, 12:21

yeah next.js

Christy Jacob
23 Dec, 2023, 12:22

Cool you can pick that in the quick start guide and look for the register and login methods

Christy Jacob
23 Dec, 2023, 12:22

That's where your making a mistake

jasonetorres (class 23)
23 Dec, 2023, 12:26

alright I will check it out, I am pretty sure its gotta be close my accounts register in my users etc

Christy Jacob
23 Dec, 2023, 12:27

Yea you're already able to create accounts. You just need to get the code in to create a session

Christy Jacob
23 Dec, 2023, 12:28

Let's mark this as solved and you can open a new thread if there are any Appwrite specific issues

jasonetorres (class 23)
23 Dec, 2023, 12:39

Alright!

Christy Jacob
23 Dec, 2023, 12:40

Awesome 🔥

Drake
24 Dec, 2023, 18:01

So...are you creating the sessions?

jasonetorres (class 23)
25 Dec, 2023, 00:08

Full disclosure I’m not even 100% sure what that means specifically. I’m pretty green!

jasonetorres (class 23)
25 Dec, 2023, 00:14

Oh ok like this?

TypeScript
export async function signInAccount(user: { email: string; password: string }) {
  try {
    const session = await account.createEmailSession(user.email, user.password);

    return session;
  } catch (error) {
    console.log(error);
  }
}```
Drake
25 Dec, 2023, 03:14

Yes. Now, is this executed client side or server side?

jasonetorres (class 23)
25 Dec, 2023, 09:22

It appears it’s client side

Drake
25 Dec, 2023, 16:11

Would you please share a screenshot of the network logs list of requests?

Drake
25 Dec, 2023, 16:12

And your code

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