Hello everyone, I work with nuxt and I have the following issue:
Error checking user status: User (role: guests) missing scope (account)
at Client.<anonymous> (node_modules\.pnpm\appwrite@16.0.2\node_modules\appwrite\src\client.ts:695:19)
at Generator.next (<anonymous>)
at fulfilled (node_modules\.pnpm\appwrite@16.0.2\node_modules\appwrite\node_modules\tslib\tslib.es6.js:73:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Here is the code that generate this error:
const checkUser = async () => {
try {
user.value = await account.get()
} catch (error) {
console.log('Error checking user status:', error)
}
}
I have checked my active session in the cookies and I see:
a_session_<userId>: <auth_token>
how are you authenticating?
With:
account.createEmailPasswordSession(email, password)
Are you using SSR?
Yes
You probably need a session created on the server and client depending on how you are fetching data
How can I do that ?
I don't know much about Nuxt, but maybe this Next tutorial is applicable in some way?
Ok thank you, I'll try to see that
Recommended threads
- is `account.get()` safe to be used in th...
I want to user's `id` for authentication. However, a while ago I was told in this server not to use `account.get()` and instead add user preferences for that us...
- Usage of the new Client() and dealing wi...
Hey guys, just a quick one - we had some web traffic the other day and it ended up bombing out - To put in perspective of how the app works, we have a Nuxt Ap...
- edu email
my edu email is my seccondary email for github and when i signed in i dont think its registering i have an edu email using githubs education pack anyone know ho...