@frontegg/ionic-capacitor 2.1.3-alpha.29915380828 → 2.1.3-alpha.29915384499

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.
@@ -84,7 +84,10 @@ public class FronteggNativePlugin extends Plugin {
84
84
  }
85
85
 
86
86
  } catch (JSONException e) {
87
- throw new RuntimeException(e);
87
+ // FR-25948: don't throw a RuntimeException here hard-kills the app on a config error.
88
+ // Log and abort initialization; JS calls surface the error instead of a crash.
89
+ Log.e("FronteggNative", "Failed to parse Frontegg regions config", e);
90
+ return;
88
91
  }
89
92
 
90
93
  Class<?> mainActivityClass = resolveMainActivityClass();
@@ -114,7 +117,9 @@ public class FronteggNativePlugin extends Plugin {
114
117
  }
115
118
 
116
119
  if (baseUrl == null || clientId == null) {
117
- throw new RuntimeException("Missing required config parameters: baseUrl, clientId");
120
+ // FR-25948: don't throw log and abort initialization instead of crashing the app.
121
+ Log.e("FronteggNative", "Missing required config parameters: baseUrl, clientId");
122
+ return;
118
123
  }
119
124
  if (baseUrl.startsWith("https://")) {
120
125
  baseUrl = baseUrl.substring(baseUrl.indexOf("://") + 3);
@@ -49,8 +49,10 @@ public class FronteggNativePlugin: CAPPlugin {
49
49
  }
50
50
 
51
51
  if(regions.isEmpty){
52
+ // FR-25948: don't exit(1) — hard-killing the app on misconfiguration is worse than
53
+ // leaving the plugin uninitialized. Log and return; JS calls surface the error.
52
54
  print("Frontegg Error: Missing regions configurations")
53
- exit(1)
55
+ return
54
56
  }
55
57
  fronteggApp.manualInitRegions(regions: regions,
56
58
  handleLoginWithSocialLogin: handleLoginWithSocialLogin,
@@ -76,8 +78,9 @@ public class FronteggNativePlugin: CAPPlugin {
76
78
  handleLoginWithSocialLogin: handleLoginWithSocialLogin,
77
79
  handleLoginWithSSO: handleLoginWithSSO)
78
80
  }else {
81
+ // FR-25948: don't exit(1) — log and return instead of terminating the process.
79
82
  print("Frontegg Error: Missing baseUrl or clientId in project configurations")
80
- exit(1)
83
+ return
81
84
  }
82
85
  }
83
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frontegg/ionic-capacitor",
3
- "version": "2.1.3-alpha.29915380828",
3
+ "version": "2.1.3-alpha.29915384499",
4
4
  "description": "Frontegg Ionic Capacitor SDK",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",