@umituz/react-native-auth 1.6.3 → 1.6.4
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": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "Authentication service for React Native apps - Secure, type-safe, and production-ready. Provider-agnostic design supports Firebase Auth and can be adapted for Supabase or other providers.",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -141,12 +141,20 @@ export class AuthService implements IAuthService {
|
|
|
141
141
|
* Initialize auth service with Firebase Auth instance
|
|
142
142
|
* Must be called before using any auth methods
|
|
143
143
|
*/
|
|
144
|
-
initialize(auth: Auth): void {
|
|
144
|
+
async initialize(auth: Auth): Promise<void> {
|
|
145
145
|
if (!auth) {
|
|
146
146
|
throw new AuthInitializationError("Auth instance is required");
|
|
147
147
|
}
|
|
148
148
|
this.auth = auth;
|
|
149
|
-
|
|
149
|
+
|
|
150
|
+
// Restore guest mode from storage
|
|
151
|
+
try {
|
|
152
|
+
const guestModeValue = await storageRepository.getString(GUEST_MODE_KEY, "false");
|
|
153
|
+
this.isGuestMode = guestModeValue === "true";
|
|
154
|
+
} catch (error) {
|
|
155
|
+
// If storage fails, default to false
|
|
156
|
+
this.isGuestMode = false;
|
|
157
|
+
}
|
|
150
158
|
}
|
|
151
159
|
|
|
152
160
|
/**
|