appwrite/appwrite
GitHub ã§èŠãð Bug Report: Unable to get current user session on functions using jwt
Open
#8,174 opened on 2024幎5æ21æ¥
bughelp wantedproduct / auth
Repository metrics
- Stars
- Â (56,074 stars)
- PR merge metrics
-  (å¹³åããŒãž 3d 3h) (30d ã§ 162 merged PRs)
説æ
ð Reproduction steps
import { Client} from 'node-appwrite';
const userClient = new Client();
const userAccount = new Account(userClient);
userClient.setEndpoint(FUNCTIONS_END_POINT)
.setProject(PROJECT_ID)
.setJWT(x-appwrite-user-jwt);
const currentSession = await userAccount.getSession('current');
ð Expected behavior
getSession('current') should return the current user session that is being used.
ð Actual Behavior
Fails with user_session_not_found error.
{"code":404,"type":"user_session_not_found","response":{"message":"The current user session could not be found."...}},
ð² Appwrite version
Appwrite Cloud
ð» Operating system
Linux
ð§± Your Environment
1.5.5
ð Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
ð¢ Have you read the Code of Conduct?
- I have read the Code of Conduct