
In firebase, from their firebase-admin sdk there is a way to get the user.uid from the token received (sent from front) obviously for security reasons to make sure users has right to access documents etc from server => how to do the same with node-appwrite?

and as a matter of fact, from the front react-native-appwrite, how to get the user token for his current session?

You could create a client using the user session and check if they're authenticated using account.get()
const sessionClient = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const session = req.cookies.session; // Get the session cookie from the request
if (session) {
sessionClient.setSession(session);
}
(this is from the ssr docs)

this is all frontend though; and only tells me if I'm logged in etc, but I see no token information the kind of token we usually send inside the headers of a post to backend for security
Recommended threads
- Error getting session: AppwriteException...
I get this error `Error getting session: AppwriteException: User (role: guests) missing scope (account)` when running in prod. As soon as I try running my app o...
- OTP Session template not working and is ...
Okay so it has been a long while with the issue with OTP Session template, and currently I tried self-hosting and found out that it is linked with Verification ...
- CORS and 401 Unauthorized Issues on Appw...
I'm developing a frontend app using the Appwrite Web SDK on http://localhost:3000, and I'm encountering two issues when trying to register or log in users: COR...
