
I have a weird problem in my app that Appwrite does not see the authenticated user. After await
ing account.createEmailPasswordSession()
and account.get()
I want to use the returned userID
to query a database document that only has row permissions for only this user. But I can only access the document when i give table permissions for all
, which I do not want in this case.
I assume this is an issue on the flutter side and my handling, but other operations from my app work in a similar manner.
How does Appwrite verify where the request comes from and how can I use getRow() and listRows() correctly?
Here is a tiny snippet:
final session = await _account.createEmailPasswordSession(
email: email,
password: password,
);
final user = await _account.get();
final databaseId = dotenv.get('APPWRITE_DB_ID'); //debugPrint is correct
final userID = user.$id; //debugPrint is correct
final userRows = await _tablesDB.listRows(
databaseId: databaseId,
tableId: 'user_keys',
); //this shows 0 rows if row permissions and 5 if table permissions
Recommended threads
- account.get on api route
How can i get the user info on api routes? on cliennt side we can call account.get() which maybe reads cookies though doucment object. But i want to get to get...
- Google consent screen is not showing aft...
Hey Appwrite team! 👋 I'm working on a Next.js app with Google OAuth integration using Appwrite, and I've run into a common UX scenario that could be improved. ...
- I am Trying to create my own SMS gateway...
i am using appwrite 1.2.1, where can i edit or add new customSms.php which folder should i check ? then how can i manage to edit appwrite orginal code
