@blackcode_sa/metaestetics-api 1.14.8 → 1.14.9
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/dist/index.js +1 -9
- package/dist/index.mjs +1 -9
- package/package.json +1 -1
- package/src/services/auth/auth.service.ts +6 -13
package/dist/index.js
CHANGED
|
@@ -16002,15 +16002,7 @@ var AuthService = class extends BaseService {
|
|
|
16002
16002
|
}
|
|
16003
16003
|
console.log("[AUTH] Using Firebase user:", firebaseUser.uid);
|
|
16004
16004
|
await this.waitForAuthState(firebaseUser.uid);
|
|
16005
|
-
console.log("[AUTH]
|
|
16006
|
-
await firebaseUser.getIdToken(true);
|
|
16007
|
-
console.log("[AUTH] Token refreshed successfully");
|
|
16008
|
-
console.log("[AUTH] Verifying auth.currentUser:", ((_a = this.auth.currentUser) == null ? void 0 : _a.uid) || "NULL");
|
|
16009
|
-
console.log("[AUTH] Auth instance ID:", this.auth.__debugId || "no-id");
|
|
16010
|
-
if (!this.auth.__debugId) {
|
|
16011
|
-
this.auth.__debugId = "auth-" + Date.now();
|
|
16012
|
-
}
|
|
16013
|
-
console.log("[AUTH] Auth instance ID set to:", this.auth.__debugId);
|
|
16005
|
+
console.log("[AUTH] Auth state after waitForAuthState:", ((_a = this.auth.currentUser) == null ? void 0 : _a.uid) || "NULL");
|
|
16014
16006
|
const practitionerService = new PractitionerService(this.db, this.auth, this.app);
|
|
16015
16007
|
let user = null;
|
|
16016
16008
|
try {
|
package/dist/index.mjs
CHANGED
|
@@ -16089,15 +16089,7 @@ var AuthService = class extends BaseService {
|
|
|
16089
16089
|
}
|
|
16090
16090
|
console.log("[AUTH] Using Firebase user:", firebaseUser.uid);
|
|
16091
16091
|
await this.waitForAuthState(firebaseUser.uid);
|
|
16092
|
-
console.log("[AUTH]
|
|
16093
|
-
await firebaseUser.getIdToken(true);
|
|
16094
|
-
console.log("[AUTH] Token refreshed successfully");
|
|
16095
|
-
console.log("[AUTH] Verifying auth.currentUser:", ((_a = this.auth.currentUser) == null ? void 0 : _a.uid) || "NULL");
|
|
16096
|
-
console.log("[AUTH] Auth instance ID:", this.auth.__debugId || "no-id");
|
|
16097
|
-
if (!this.auth.__debugId) {
|
|
16098
|
-
this.auth.__debugId = "auth-" + Date.now();
|
|
16099
|
-
}
|
|
16100
|
-
console.log("[AUTH] Auth instance ID set to:", this.auth.__debugId);
|
|
16092
|
+
console.log("[AUTH] Auth state after waitForAuthState:", ((_a = this.auth.currentUser) == null ? void 0 : _a.uid) || "NULL");
|
|
16101
16093
|
const practitionerService = new PractitionerService(this.db, this.auth, this.app);
|
|
16102
16094
|
let user = null;
|
|
16103
16095
|
try {
|
package/package.json
CHANGED
|
@@ -889,20 +889,13 @@ export class AuthService extends BaseService {
|
|
|
889
889
|
// This causes Firestore to not see the authenticated user, resulting in permission denied
|
|
890
890
|
await this.waitForAuthState(firebaseUser.uid);
|
|
891
891
|
|
|
892
|
-
//
|
|
893
|
-
console.log('[AUTH]
|
|
894
|
-
await firebaseUser.getIdToken(true);
|
|
895
|
-
console.log('[AUTH] Token refreshed successfully');
|
|
892
|
+
// Verify auth state BEFORE any other operations
|
|
893
|
+
console.log('[AUTH] Auth state after waitForAuthState:', this.auth.currentUser?.uid || 'NULL');
|
|
896
894
|
|
|
897
|
-
//
|
|
898
|
-
console.log('[AUTH]
|
|
899
|
-
//
|
|
900
|
-
console.log('[AUTH]
|
|
901
|
-
// @ts-ignore - Add debug ID if not exists
|
|
902
|
-
if (!(this.auth as any).__debugId) {
|
|
903
|
-
(this.auth as any).__debugId = 'auth-' + Date.now();
|
|
904
|
-
}
|
|
905
|
-
console.log('[AUTH] Auth instance ID set to:', (this.auth as any).__debugId);
|
|
895
|
+
// DON'T force token refresh - it might be clearing auth state in React Native!
|
|
896
|
+
// console.log('[AUTH] Forcing token refresh...');
|
|
897
|
+
// await firebaseUser.getIdToken(true);
|
|
898
|
+
// console.log('[AUTH] Token refreshed successfully');
|
|
906
899
|
|
|
907
900
|
const practitionerService = new PractitionerService(this.db, this.auth, this.app);
|
|
908
901
|
|