@frontegg/ionic-capacitor 2.0.6-alpha.8249357983 → 2.0.6-alpha.8294121845
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/README.md
CHANGED
|
@@ -17,7 +17,8 @@ features for the product-led era.
|
|
|
17
17
|
- [Setup Android Project](#setup-android-project)
|
|
18
18
|
- [Set minimum SDK version](#set-minimum-sdk-version)
|
|
19
19
|
- [Configure build config fields](#configure-build-config-fields)
|
|
20
|
-
- [Config Android AssetLinks](#config-
|
|
20
|
+
- [Config Android AssetLinks](#config-android-assetlinks)
|
|
21
|
+
- [Enabling Chrome Custom Tabs for Social Login](#enabling-chrome-custom-tabs-for-social-login)
|
|
21
22
|
- [Angular Usages](#angular-usages)
|
|
22
23
|
- [Integrate Frontegg](#integrate-frontegg)
|
|
23
24
|
- [Protect Routes](#protect-routes)
|
|
@@ -321,6 +322,42 @@ keytool -list -v -keystore /PATH/file.jks -alias YourAlias -storepass *** -keypa
|
|
|
321
322
|
In order to use our API’s, follow [this guide](https://docs.frontegg.com/reference/getting-started-with-your-api) to
|
|
322
323
|
generate a vendor token.
|
|
323
324
|
|
|
325
|
+
|
|
326
|
+
### Enabling Chrome Custom Tabs for Social Login
|
|
327
|
+
|
|
328
|
+
To enable social login via Chrome Custom Tabs in Android application, modify your `capacitor.config.ts` file and set the useChromeCustomTabs flag to true . By default, the SDK uses the Chrome browser for social login.
|
|
329
|
+
|
|
330
|
+
```typescript
|
|
331
|
+
import { CapacitorConfig } from '@capacitor/cli';
|
|
332
|
+
|
|
333
|
+
const config: CapacitorConfig = {
|
|
334
|
+
appId: '{YOUR_APPLICATION_ID}',
|
|
335
|
+
appName: '{YOUR_APPLICATION_NAME}',
|
|
336
|
+
webDir: 'www',
|
|
337
|
+
server: {
|
|
338
|
+
androidScheme: 'https'
|
|
339
|
+
},
|
|
340
|
+
ios: {
|
|
341
|
+
path: 'ios',
|
|
342
|
+
},
|
|
343
|
+
android: {
|
|
344
|
+
path: 'android',
|
|
345
|
+
},
|
|
346
|
+
|
|
347
|
+
plugins: {
|
|
348
|
+
FronteggNative:{
|
|
349
|
+
baseUrl: 'https://{FRONTEGG_DOMAIN_HOST.com}',
|
|
350
|
+
clientId: '{FRONTEGG_CLIENT_ID}',
|
|
351
|
+
|
|
352
|
+
useChromeCustomTabs: true
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
export default config;
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
|
|
324
361
|
## Angular Usages
|
|
325
362
|
|
|
326
363
|
### Integrate Frontegg:
|
|
@@ -218,7 +218,7 @@ public class FronteggNativePlugin extends Plugin {
|
|
|
218
218
|
public void getConstants(PluginCall call) {
|
|
219
219
|
|
|
220
220
|
String baseUrl = FronteggAuth.Companion.getInstance().getBaseUrl();
|
|
221
|
-
String clientId = FronteggAuth.Companion.getInstance().
|
|
221
|
+
String clientId = FronteggAuth.Companion.getInstance().getClientId();
|
|
222
222
|
String packageName = getContext().getPackageName();
|
|
223
223
|
|
|
224
224
|
List<RegionConfig> regionsData = FronteggApp.Companion.getInstance().getRegions();
|
|
@@ -11,6 +11,7 @@ CAP_PLUGIN(FronteggNativePlugin, "FronteggNative",
|
|
|
11
11
|
CAP_PLUGIN_METHOD(switchTenant, CAPPluginReturnPromise);
|
|
12
12
|
CAP_PLUGIN_METHOD(refreshToken, CAPPluginReturnPromise);
|
|
13
13
|
CAP_PLUGIN_METHOD(initWithRegion, CAPPluginReturnPromise);
|
|
14
|
+
CAP_PLUGIN_METHOD(directLoginAction, CAPPluginReturnPromise);
|
|
14
15
|
)
|
|
15
16
|
|
|
16
17
|
|