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
- Wifi issue with Pop!_OS linux distro
Hey guys... iam facing this very peculiar trouble with my linux distro... I use Pop!_OS on my HP victus gaming laptop with nvedia 2050 graphics card.... The pro...
- Project restoration button in console
The project restore button in console is taking no effect, i have tried several times and still nothing, it gives same popup if i reload
- Auth not working
guys my appwrite auth isnt working? oauth works (Sign in with google n discord) i have 2 websites deployed where do i get help when i do sign in with email and ...