
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
- After upgrading expo 52 to 53
Hello After upgrading my project from Expo SDK 52 to SDK 53, I encountered the following error when running the app: TurboModuleRegistry.getEnforcing(...): 'P...
- How can I use react-native-appwrite in a...
I'm building an app using React Native CLI (not Expo), and I want to add Google Sign-In authentication. However, when I try to use react-native-appwrite, it thr...
- Error: Invalid `userId` param: Parameter...
