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: User (role: guests) missing scope...
I want to send a verification code to the user and the given phone number and check it and create a session right after the user entered the secret. For me that...
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- [SOLVED] React Native Appwrite SDK not w...
So I'm trying to generate a unique ID using the ID.unique() and its generating properly, but its saying its longer than 36 characters but it isnt.. ```typescri...