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
- Weird permission failure
when creating an account I use following methods: ``` Future<void> register(String email, String password, String username) async { final user = await accoun...
- Flutter Android oAuth is no more working
I currently don't get the oAuth login to work in flutter android. it works on ios and on web. but when try to use it on Android, i get to the point where the ca...
- Paused project can't activate
I have failed to reactivate one my projects which had been paused