@frontegg/ionic-capacitor 2.0.9-alpha.10663474341 → 2.0.9-alpha.10738173625
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.
|
@@ -13,7 +13,7 @@ Pod::Spec.new do |s|
|
|
|
13
13
|
s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
14
|
s.ios.deployment_target = '14.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
|
-
s.dependency "FronteggSwift", "1.2.
|
|
16
|
+
s.dependency "FronteggSwift", "1.2.20"
|
|
17
17
|
s.swift_version = '5.1'
|
|
18
18
|
s.pod_target_xcconfig = {
|
|
19
19
|
'CODE_SIGNING_ALLOWED' => 'YES'
|
package/android/build.gradle
CHANGED
|
@@ -55,7 +55,7 @@ dependencies {
|
|
|
55
55
|
implementation "androidx.browser:browser:1.5.0"
|
|
56
56
|
implementation 'io.reactivex.rxjava3:rxkotlin:3.0.1'
|
|
57
57
|
implementation 'com.google.code.gson:gson:2.10'
|
|
58
|
-
implementation 'com.frontegg.sdk:android:1.2.
|
|
58
|
+
implementation 'com.frontegg.sdk:android:1.2.24'
|
|
59
59
|
|
|
60
60
|
testImplementation "junit:junit:$junitVersion"
|
|
61
61
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
@@ -56,10 +56,10 @@ public class FronteggNativePlugin extends Plugin {
|
|
|
56
56
|
applicationId = regionJson.getString("applicationId");
|
|
57
57
|
}
|
|
58
58
|
regions.add(new RegionConfig(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
regionJson.getString("key"),
|
|
60
|
+
regionJson.getString("baseUrl"),
|
|
61
|
+
regionJson.getString("clientId"),
|
|
62
|
+
applicationId
|
|
63
63
|
));
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -80,21 +80,21 @@ public class FronteggNativePlugin extends Plugin {
|
|
|
80
80
|
baseUrl = baseUrl.substring(baseUrl.indexOf("://") + 3);
|
|
81
81
|
}
|
|
82
82
|
FronteggApp.Companion.init(
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
baseUrl,
|
|
84
|
+
clientId,
|
|
85
|
+
this.getContext(),
|
|
86
|
+
applicationId,
|
|
87
|
+
useAssetLinks,
|
|
88
|
+
useChromeCustomTabs,
|
|
89
|
+
null
|
|
90
90
|
);
|
|
91
91
|
} else {
|
|
92
92
|
FronteggApp.Companion.initWithRegions(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
regions,
|
|
94
|
+
this.getContext(),
|
|
95
|
+
useAssetLinks,
|
|
96
|
+
useChromeCustomTabs,
|
|
97
|
+
null
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -104,13 +104,13 @@ public class FronteggNativePlugin extends Plugin {
|
|
|
104
104
|
this.disposable.dispose();
|
|
105
105
|
}
|
|
106
106
|
this.disposable = Observable.mergeArray(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
107
|
+
auth.getAccessToken().getObservable(),
|
|
108
|
+
auth.getRefreshToken().getObservable(),
|
|
109
|
+
auth.getUser().getObservable(),
|
|
110
|
+
auth.isAuthenticated().getObservable(),
|
|
111
|
+
auth.isLoading().getObservable(),
|
|
112
|
+
auth.getInitializing().getObservable(),
|
|
113
|
+
auth.getShowLoader().getObservable()
|
|
114
114
|
).subscribe(nullableObject -> {
|
|
115
115
|
debouncer.debounce(this::sendEvent);
|
|
116
116
|
});
|
|
@@ -166,8 +166,10 @@ public class FronteggNativePlugin extends Plugin {
|
|
|
166
166
|
call.reject("No type or data provided");
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
|
-
FronteggApp.Companion.getInstance().getAuth().directLoginAction(this.getActivity(), type, data)
|
|
170
|
-
|
|
169
|
+
FronteggApp.Companion.getInstance().getAuth().directLoginAction(this.getActivity(), type, data, () -> {
|
|
170
|
+
call.resolve();
|
|
171
|
+
return null;
|
|
172
|
+
});
|
|
171
173
|
}
|
|
172
174
|
|
|
173
175
|
@PluginMethod
|
|
@@ -176,13 +176,8 @@ public class FronteggNativePlugin: CAPPlugin {
|
|
|
176
176
|
let ephemeralSession = call.getBool("ephemeralSession", true)
|
|
177
177
|
|
|
178
178
|
DispatchQueue.main.sync {
|
|
179
|
-
fronteggApp.auth.directLoginAction(window: nil, type: type, data: data, ephemeralSession: ephemeralSession) {
|
|
180
|
-
|
|
181
|
-
case .failure(let error):
|
|
182
|
-
call.reject("\((error as NSError).code)")
|
|
183
|
-
case .success(let user):
|
|
184
|
-
call.resolve()
|
|
185
|
-
}
|
|
179
|
+
fronteggApp.auth.directLoginAction(window: nil, type: type, data: data, ephemeralSession: ephemeralSession) { _ in
|
|
180
|
+
call.resolve()
|
|
186
181
|
}
|
|
187
182
|
}
|
|
188
183
|
|
|
@@ -220,7 +215,7 @@ public class FronteggNativePlugin: CAPPlugin {
|
|
|
220
215
|
DispatchQueue.global(qos: .background).async {
|
|
221
216
|
Task {
|
|
222
217
|
let result = await self.fronteggApp.auth.refreshTokenIfNeeded()
|
|
223
|
-
|
|
218
|
+
|
|
224
219
|
let response: [String: Any?] = [
|
|
225
220
|
"success": result
|
|
226
221
|
]
|