
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
- User (role: guests) missing scope (accou...
is this an expected behavior?
- Login server-side action (NextJS) not cr...
(for <@186656408450629633>) hello, so I created this login function: ```ts export async function logIn(email: string, password: string) { const account = new ...
- Please help, this issue occurs when conn...
