Skip to content

Commit b1dd444

Browse files
authoredMay 21, 2025
Merge pull request #58 from appwrite/dev
fix: remove credentials when devKeys is set
2 parents c9213cc + b1a5857 commit b1dd444

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed
 

‎package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "react-native-appwrite",
33
"homepage": "https://appwrite.io/support",
44
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5-
"version": "0.9.1",
5+
"version": "0.9.2",
66
"license": "BSD-3-Clause",
77
"main": "dist/cjs/sdk.js",
88
"exports": {

‎src/client.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class Client {
115115
'x-sdk-name': 'React Native',
116116
'x-sdk-platform': 'client',
117117
'x-sdk-language': 'reactnative',
118-
'x-sdk-version': '0.9.1',
118+
'x-sdk-version': '0.9.2',
119119
'X-Appwrite-Response-Format': '1.7.0',
120120
};
121121

@@ -441,9 +441,12 @@ class Client {
441441
let options: RequestInit = {
442442
method,
443443
headers,
444-
credentials: 'include'
445444
};
446445

446+
if (headers['X-Appwrite-Dev-Key'] === undefined) {
447+
options.credentials = 'include';
448+
}
449+
447450
if (method === 'GET') {
448451
for (const [key, value] of Object.entries(Service.flatten(params))) {
449452
url.searchParams.append(key, value);

0 commit comments

Comments
 (0)
Please sign in to comment.