@seaverse/data-service-sdk 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/browser.js +3 -2
- package/dist/browser.js.map +1 -1
- package/dist/browser.umd.js +3 -2
- package/dist/browser.umd.js.map +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -237,6 +237,20 @@ const app = initializeApp({
|
|
|
237
237
|
|
|
238
238
|
const auth = getAuth(app);
|
|
239
239
|
await signInWithCustomToken(auth, tokenResponse.custom_token);
|
|
240
|
+
|
|
241
|
+
// ⚠️ IMPORTANT: Must specify database_id!
|
|
242
|
+
const db = getFirestore(app, tokenResponse.database_id);
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
**🚨 CRITICAL: Always Specify database_id**
|
|
246
|
+
|
|
247
|
+
When initializing Firestore, you MUST pass the `database_id` from the token response:
|
|
248
|
+
|
|
249
|
+
```typescript
|
|
250
|
+
// ✅ CORRECT - Specify database_id
|
|
251
|
+
const db = getFirestore(app, tokenResponse.database_id);
|
|
252
|
+
|
|
253
|
+
// ❌ WRONG - Will try to use "(default)" database which may not exist
|
|
240
254
|
const db = getFirestore(app);
|
|
241
255
|
```
|
|
242
256
|
|
package/dist/browser.js
CHANGED
|
@@ -4251,8 +4251,9 @@ async function initializeWithToken(tokenResponse) {
|
|
|
4251
4251
|
// Sign in with custom token
|
|
4252
4252
|
const auth = getAuth(app);
|
|
4253
4253
|
await signInWithCustomToken(auth, tokenResponse.custom_token);
|
|
4254
|
-
// Get Firestore instance
|
|
4255
|
-
|
|
4254
|
+
// Get Firestore instance with correct database ID
|
|
4255
|
+
// IMPORTANT: Must specify database_id, not just use default!
|
|
4256
|
+
const db = getFirestore(app, tokenResponse.database_id);
|
|
4256
4257
|
return {
|
|
4257
4258
|
app,
|
|
4258
4259
|
auth,
|