Back

Could not find user session: app.<project_id>@service.cloud.appwrite.io (role: applications)

  • 0
  • Auth
  • Web
  • Functions
mcjo3324
18 Oct, 2024, 12:50

Hello,

Error : Could not find user session: &#97;&#112;&#112;&#46;&#54;&#x36;&#x65;&#x30;&#51;&#52;&#102;&#55;&#x30;&#48;&#x31;&#102;&#x31;&#x61;&#102;&#x65;&#98;&#49;&#x36;&#x33;&#64;&#115;&#x65;&#114;&#118;&#x69;&#x63;&#x65;&#46;&#99;&#108;&#111;&#x75;&#100;&#46;&#x61;&#x70;&#112;&#x77;&#x72;&#x69;&#x74;&#x65;&#x2e;&#x69;&#x6f; (role: applications) missing scope (account)

I have this error when i'm trying to check if i'm logged.

I have 2 functions : one to create my session and another to check if my user is logged. I already tried to change roles in my appwrite.json and my session is created.

If someone has some tips or whatever, i'm free to speak about it.

Thanks.

TL;DR
Issue: Developer is receiving an error "Could not find user session" when trying to check for user login status. The error is caused by passing an API key instead of proper user session credentials. Solution: Do not pass an API key when checking user session. Ensure proper user session credentials are used for authentication.
D5
18 Oct, 2024, 12:51

Do you can send the code that is throwing this error?

Joshi
18 Oct, 2024, 12:52

You are using an API key here

Joshi
18 Oct, 2024, 12:52

Do not pass an API key in this case when you want to check an users session

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