@frontegg/ionic-capacitor 2.1.3-alpha.29915368020 → 2.1.3-alpha.29915375969
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.
|
@@ -286,14 +286,13 @@ public class FronteggNativePlugin extends Plugin {
|
|
|
286
286
|
executor.submit(() -> {
|
|
287
287
|
Handler handler = new Handler(Looper.getMainLooper());
|
|
288
288
|
FronteggAuth fronteggAuth = FronteggAppKt.getFronteggAuth(this.getContext());
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}
|
|
289
|
+
// FR-25946: previously a failed refresh (e.g. a transient network blip during an
|
|
290
|
+
// app-initiated refreshToken()) logged the user out — destructive and divergent from
|
|
291
|
+
// iOS. Resolve { success } instead and leave the session intact, matching iOS.
|
|
292
|
+
boolean success = fronteggAuth.refreshTokenIfNeeded();
|
|
293
|
+
JSObject result = new JSObject();
|
|
294
|
+
result.put("success", success);
|
|
295
|
+
handler.post(() -> call.resolve(result));
|
|
297
296
|
});
|
|
298
297
|
}
|
|
299
298
|
|
|
@@ -238,6 +238,9 @@ public class FronteggNativePlugin: CAPPlugin {
|
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
fronteggApp.initWithRegion(regionKey: regionKey)
|
|
241
|
+
// FR-25945: the JS promise from initWithRegion hung forever on iOS because we never
|
|
242
|
+
// resolved the call (Android already resolves). Resolve so await-based region flows proceed.
|
|
243
|
+
call.resolve()
|
|
241
244
|
}
|
|
242
245
|
|
|
243
246
|
@objc func refreshToken(_ call: CAPPluginCall) {
|