Same reason why account.get() would fail. There needs to be a session
user CreateEmailSession() I was able to create a session id
I have stored this session id and stored it in browser session storage
now when I need to logout I am just trying to delete the session so that I am logged out, i am following correctly
Still didnt understood
I thought, create account, then create email session is enough to login and authenticate, can you point me to any documentation explaining how this works
The session isn't just an ID. Is your tech stack?
Sorry didnt get you
What are you using to build your app? React? NextJS? Nodejs?
Ahh, Astro js
checking what you mentioned in an earlier message if I am getting same error when I am trying to access account.get()
Yeah I get the same error as below on access account.get()
at Client.<anonymous> (file:///Users/tejas.shah/Projects/thehigglers/thehigglers/node_modules/appwrite/dist/esm/sdk.js:385:27)
at Generator.next (<anonymous>)
at fulfilled (file:///Users/tejas.shah/Projects/thehigglers/thehigglers/node_modules/appwrite/dist/esm/sdk.js:22:58)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
code: 401,
type: 'general_unauthorized_scope',
response: {
message: 'User (role: guests) missing scope (account)',
code: 401,
type: 'general_unauthorized_scope',
version: '0.10.10'
}
}```
I am using SSR with Astrojs on a node js server
Ya that's the big problem. You might be creating the session server side which doesn't persist. If you're making the session client side, it won't automatically be used server side
No, No I am not creating the session server side, I am creating it on the client side
I always recommend avoiding SSR when possible
Astro is little different interms of SSR
I agree over the last office hours this was discussed but with astro we will have to use SSR if authentication needs to be setup, secondly I tried creating the session on client side using vanila js as well, I store the response in session storage still I am unable to delete the created session on the Appwrite.
This seems to be some bug as I saw some other support tickets getting raised with the same error message.
As I mentioned the result of the API call is just data. It's not the actual session. The session is stored in a cookie or the x-fallback-cookies header
but not 100% sure on this .
oh is it, and this values gets stored in the cookie by the client sdk itself ?
Browser automatically handles cookies
Recommended threads
- Do I need to upgrade my Appwrite plan?
So i am making a file hosting & sharing platform (voltzy.lol) and i am expecting approx 5-8 million visit per month and over 30 million uploads per month do i n...
- Need a web developer
Need. Web developer for a paid project/collaboration
- total parameter not working correctly in...
Hello Appwrite team, I'm experiencing issues with the total parameter in the listRows() method (TablesDB) across multiple SDKs. **Issue 1**: Node.js SDK (node...