@umituz/react-native-auth 3.6.26 → 3.6.28

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-auth",
3
- "version": "3.6.26",
3
+ "version": "3.6.28",
4
4
  "description": "Authentication service for React Native apps - Secure, type-safe, and production-ready. Provider-agnostic design with dependency injection, configurable validation, and comprehensive error handling.",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -89,6 +89,18 @@ export class FirebaseAuthProvider implements IAuthProvider {
89
89
  });
90
90
  }
91
91
 
92
+ // Reload user to refresh token before linking (prevents token-expired errors)
93
+ try {
94
+ await currentUser.reload();
95
+ if (__DEV__) {
96
+ console.log("[FirebaseAuthProvider] User reloaded successfully");
97
+ }
98
+ } catch (reloadError) {
99
+ if (__DEV__) {
100
+ console.log("[FirebaseAuthProvider] Reload failed, proceeding with link:", reloadError);
101
+ }
102
+ }
103
+
92
104
  const credential = EmailAuthProvider.credential(
93
105
  credentials.email.trim(),
94
106
  credentials.password