@rownd/react-native 2.8.0 → 2.8.2
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 +2 -0
- package/android/build.gradle +2 -1
- package/android/src/main/java/com/reactnativerowndplugin/RowndPluginModule.kt +12 -8
- package/android/src/main/java/com/reactnativerowndplugin/RowndPluginPackage.kt +11 -0
- package/lib/commonjs/utils/config.js.map +1 -1
- package/lib/commonjs/utils/nativeModule.js +1 -1
- package/lib/commonjs/utils/nativeModule.js.map +1 -1
- package/lib/module/utils/config.js.map +1 -1
- package/lib/module/utils/nativeModule.js +1 -1
- package/lib/module/utils/nativeModule.js.map +1 -1
- package/lib/typescript/utils/config.d.ts +2 -0
- package/package.json +1 -1
- package/src/utils/config.ts +2 -0
- package/src/utils/nativeModule.ts +1 -1
package/README.md
CHANGED
|
@@ -30,6 +30,8 @@ ext {
|
|
|
30
30
|
cd android && ./gradlew build
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
+
3. Check and update your ProGuard config using [the rules from our Android SDK](https://github.com/rownd/android/blob/main/README.md#proguard-config).
|
|
34
|
+
|
|
33
35
|
### iOS
|
|
34
36
|
|
|
35
37
|
1. Ensure iOS version is at least 14. File: *ios/Podfile*
|
package/android/build.gradle
CHANGED
|
@@ -61,6 +61,7 @@ android {
|
|
|
61
61
|
|
|
62
62
|
repositories {
|
|
63
63
|
mavenCentral()
|
|
64
|
+
mavenLocal()
|
|
64
65
|
google()
|
|
65
66
|
|
|
66
67
|
def found = false
|
|
@@ -135,7 +136,7 @@ dependencies {
|
|
|
135
136
|
//noinspection GradleDynamicVersion
|
|
136
137
|
implementation "com.facebook.react:react-native:+"
|
|
137
138
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
138
|
-
implementation 'io.rownd:android:2.1
|
|
139
|
+
implementation 'io.rownd:android:2.3.1'
|
|
139
140
|
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2"
|
|
140
141
|
implementation 'androidx.compose.ui:ui-unit:1.3.0'
|
|
141
142
|
implementation 'androidx.compose.ui:ui-graphics:1.3.0'
|
|
@@ -74,16 +74,9 @@ class RowndPluginModule(reactContext: ReactApplicationContext) : ReactContextBas
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// Example method
|
|
78
|
-
// See https://reactnative.dev/docs/native-modules-android
|
|
79
|
-
@ReactMethod
|
|
80
|
-
fun multiply(a: Int, b: Int, promise: Promise) {
|
|
81
|
-
promise.resolve(a * b * 10)
|
|
82
|
-
}
|
|
83
|
-
|
|
84
77
|
@ReactMethod
|
|
85
78
|
fun customizations(config: ReadableMap) {
|
|
86
|
-
|
|
79
|
+
val appCustomizations = AppCustomizations(reactApplicationContext.currentActivity as FragmentActivity)
|
|
87
80
|
|
|
88
81
|
val sheetBackgroundHexColor: String? = config.getString("sheetBackgroundHexColor")
|
|
89
82
|
if (sheetBackgroundHexColor != null) {
|
|
@@ -106,6 +99,17 @@ class RowndPluginModule(reactContext: ReactApplicationContext) : ReactContextBas
|
|
|
106
99
|
@ReactMethod
|
|
107
100
|
fun configure(config: ReadableMap) {
|
|
108
101
|
val appKey = config.getString("appKey")
|
|
102
|
+
val apiUrl = config.getString("apiUrl")
|
|
103
|
+
val baseUrl = config.getString("baseUrl")
|
|
104
|
+
|
|
105
|
+
if (apiUrl != null) {
|
|
106
|
+
Rownd.config.apiUrl = apiUrl
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
if (baseUrl != null) {
|
|
110
|
+
Rownd.config.baseUrl = baseUrl
|
|
111
|
+
}
|
|
112
|
+
|
|
109
113
|
if (appKey != null) {
|
|
110
114
|
Rownd.configure(reactApplicationContext.currentActivity as FragmentActivity, appKey)
|
|
111
115
|
isRowndJSInitialized = true
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
package com.reactnativerowndplugin
|
|
2
|
+
import android.app.Application
|
|
3
|
+
import androidx.fragment.app.Fragment
|
|
4
|
+
import androidx.fragment.app.FragmentActivity
|
|
2
5
|
import com.facebook.react.ReactPackage
|
|
3
6
|
import com.facebook.react.bridge.NativeModule
|
|
4
7
|
import com.facebook.react.bridge.ReactApplicationContext
|
|
5
8
|
import com.facebook.react.uimanager.ViewManager
|
|
9
|
+
import io.rownd.android.Rownd
|
|
6
10
|
|
|
7
11
|
|
|
8
12
|
class RowndPluginPackage : ReactPackage {
|
|
@@ -13,4 +17,11 @@ class RowndPluginPackage : ReactPackage {
|
|
|
13
17
|
override fun createViewManagers(reactContext: ReactApplicationContext): List<ViewManager<*, *>> {
|
|
14
18
|
return emptyList()
|
|
15
19
|
}
|
|
20
|
+
|
|
21
|
+
companion object {
|
|
22
|
+
@JvmStatic
|
|
23
|
+
fun preInit(activity: FragmentActivity) {
|
|
24
|
+
Rownd._registerActivityLifecycle(activity)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
16
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["config.ts"],"sourcesContent":["export interface IConfig {\n appKey: string;\n}\n\nexport interface Customizations {\n sheetBackgroundHexColor?: string;\n sheetCornerBorderRadius?: string;\n loadingAnimation?: string;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["config.ts"],"sourcesContent":["export interface IConfig {\n appKey: string;\n apiUrl?: string;\n baseUrl?: string;\n}\n\nexport interface Customizations {\n sheetBackgroundHexColor?: string;\n sheetCornerBorderRadius?: string;\n loadingAnimation?: string;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","Rownd","NativeModules","RowndPlugin","Proxy","get","Error","IOSRowndEventEmitter","OS","RowndPluginEventEmitter","configure","config","customizations","customizationConfig","requestSignIn","method","postSignInRedirect","undefined","signOut","manageAccount","getAccessToken","setUserDataValue","key","value","setUserData","data","handleSignInLink","url"],"sources":["nativeModule.ts"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport type { RequestSignIn } from 'src/hooks/rownd';\nimport type { Customizations, IConfig } from './config';\n\nexport const LINKING_ERROR =\n `The package '@rownd/react-native' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nexport const Rownd = NativeModules.RowndPlugin\n ? NativeModules.RowndPlugin\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport const IOSRowndEventEmitter =\n Platform.OS !== 'ios'\n ? null\n : NativeModules.RowndPluginEventEmitter\n ? NativeModules.RowndPluginEventEmitter\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function configure(config: IConfig): Promise<string> {\n return Rownd.configure(config);\n}\n\nexport function customizations(customizationConfig: Customizations) {\n return Rownd.customizations(customizationConfig);\n}\n\nexport function requestSignIn(config?: RequestSignIn) {\n if (!config) {\n Rownd.requestSignIn({ method: 'default' });\n }\n return Rownd.requestSignIn({\n method: config?.method || 'default',\n postSignInRedirect: config?.postSignInRedirect || undefined,\n });\n}\n\nexport function signOut() {\n return Rownd.signOut();\n}\n\nexport function manageAccount() {\n return Rownd.manageAccount();\n}\n\nexport function getAccessToken(): Promise<string> {\n return Rownd.getAccessToken();\n}\n\nexport function setUserDataValue(key: string, value: any) {\n return Rownd.setUserDataValue(\n key,\n Platform.OS === 'android' ? { value } : value\n );\n}\n\nexport function setUserData(data: Record<string, any>) {\n return Rownd.setUserData(data);\n}\n\nexport function handleSignInLink(url: string) {\n return Rownd.handleSignInLink(url);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;;AAIO,MAAMA,aAAa,GACvB,8EAAD,GACAC,qBAAA,CAASC,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJK;;AAMA,MAAMC,KAAK,GAAGC,0BAAA,CAAcC,WAAd,GACjBD,0BAAA,CAAcC,WADG,GAEjB,IAAIC,KAAJ,CACE,EADF,EAEE;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAJ,CAAUV,aAAV,CAAN;EACD;;AAHH,CAFF,CAFG;;AAWA,MAAMW,oBAAoB,GAC/BV,qBAAA,CAASW,EAAT,KAAgB,KAAhB,GACI,IADJ,GAEIN,0BAAA,CAAcO,uBAAd,GACAP,0BAAA,CAAcO,uBADd,GAEA,IAAIL,KAAJ,CACE,EADF,EAEE;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAJ,CAAUV,aAAV,CAAN;EACD;;AAHH,CAFF,CALC;;;AAcA,SAASc,SAAT,CAAmBC,MAAnB,EAAqD;EAC1D,OAAOV,KAAK,CAACS,SAAN,CAAgBC,MAAhB,CAAP;AACD;;AAEM,SAASC,cAAT,CAAwBC,mBAAxB,EAA6D;EAClE,OAAOZ,KAAK,CAACW,cAAN,CAAqBC,mBAArB,CAAP;AACD;;AAEM,SAASC,aAAT,CAAuBH,MAAvB,EAA+C;EACpD,IAAI,CAACA,MAAL,EAAa;
|
|
1
|
+
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","Rownd","NativeModules","RowndPlugin","Proxy","get","Error","IOSRowndEventEmitter","OS","RowndPluginEventEmitter","configure","config","customizations","customizationConfig","requestSignIn","method","postSignInRedirect","undefined","signOut","manageAccount","getAccessToken","setUserDataValue","key","value","setUserData","data","handleSignInLink","url"],"sources":["nativeModule.ts"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport type { RequestSignIn } from 'src/hooks/rownd';\nimport type { Customizations, IConfig } from './config';\n\nexport const LINKING_ERROR =\n `The package '@rownd/react-native' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nexport const Rownd = NativeModules.RowndPlugin\n ? NativeModules.RowndPlugin\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport const IOSRowndEventEmitter =\n Platform.OS !== 'ios'\n ? null\n : NativeModules.RowndPluginEventEmitter\n ? NativeModules.RowndPluginEventEmitter\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function configure(config: IConfig): Promise<string> {\n return Rownd.configure(config);\n}\n\nexport function customizations(customizationConfig: Customizations) {\n return Rownd.customizations(customizationConfig);\n}\n\nexport function requestSignIn(config?: RequestSignIn) {\n if (!config) {\n return Rownd.requestSignIn({ method: 'default' });\n }\n return Rownd.requestSignIn({\n method: config?.method || 'default',\n postSignInRedirect: config?.postSignInRedirect || undefined,\n });\n}\n\nexport function signOut() {\n return Rownd.signOut();\n}\n\nexport function manageAccount() {\n return Rownd.manageAccount();\n}\n\nexport function getAccessToken(): Promise<string> {\n return Rownd.getAccessToken();\n}\n\nexport function setUserDataValue(key: string, value: any) {\n return Rownd.setUserDataValue(\n key,\n Platform.OS === 'android' ? { value } : value\n );\n}\n\nexport function setUserData(data: Record<string, any>) {\n return Rownd.setUserData(data);\n}\n\nexport function handleSignInLink(url: string) {\n return Rownd.handleSignInLink(url);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;;AAIO,MAAMA,aAAa,GACvB,8EAAD,GACAC,qBAAA,CAASC,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJK;;AAMA,MAAMC,KAAK,GAAGC,0BAAA,CAAcC,WAAd,GACjBD,0BAAA,CAAcC,WADG,GAEjB,IAAIC,KAAJ,CACE,EADF,EAEE;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAJ,CAAUV,aAAV,CAAN;EACD;;AAHH,CAFF,CAFG;;AAWA,MAAMW,oBAAoB,G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AAwCA,KAFnC,CAAP;AAID;;AAEM,SAASC,WAAT,CAAqBC,IAArB,EAAgD;EACrD,OAAOxB,KAAK,CAACuB,WAAN,CAAkBC,IAAlB,CAAP;AACD;;AAEM,SAASC,gBAAT,CAA0BC,GAA1B,EAAuC;EAC5C,OAAO1B,KAAK,CAACyB,gBAAN,CAAuBC,GAAvB,CAAP;AACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["config.ts"],"sourcesContent":["export interface IConfig {\n appKey: string;\n}\n\nexport interface Customizations {\n sheetBackgroundHexColor?: string;\n sheetCornerBorderRadius?: string;\n loadingAnimation?: string;\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"names":[],"sources":["config.ts"],"sourcesContent":["export interface IConfig {\n appKey: string;\n apiUrl?: string;\n baseUrl?: string;\n}\n\nexport interface Customizations {\n sheetBackgroundHexColor?: string;\n sheetCornerBorderRadius?: string;\n loadingAnimation?: string;\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","Rownd","RowndPlugin","Proxy","get","Error","IOSRowndEventEmitter","OS","RowndPluginEventEmitter","configure","config","customizations","customizationConfig","requestSignIn","method","postSignInRedirect","undefined","signOut","manageAccount","getAccessToken","setUserDataValue","key","value","setUserData","data","handleSignInLink","url"],"sources":["nativeModule.ts"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport type { RequestSignIn } from 'src/hooks/rownd';\nimport type { Customizations, IConfig } from './config';\n\nexport const LINKING_ERROR =\n `The package '@rownd/react-native' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nexport const Rownd = NativeModules.RowndPlugin\n ? NativeModules.RowndPlugin\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport const IOSRowndEventEmitter =\n Platform.OS !== 'ios'\n ? null\n : NativeModules.RowndPluginEventEmitter\n ? NativeModules.RowndPluginEventEmitter\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function configure(config: IConfig): Promise<string> {\n return Rownd.configure(config);\n}\n\nexport function customizations(customizationConfig: Customizations) {\n return Rownd.customizations(customizationConfig);\n}\n\nexport function requestSignIn(config?: RequestSignIn) {\n if (!config) {\n Rownd.requestSignIn({ method: 'default' });\n }\n return Rownd.requestSignIn({\n method: config?.method || 'default',\n postSignInRedirect: config?.postSignInRedirect || undefined,\n });\n}\n\nexport function signOut() {\n return Rownd.signOut();\n}\n\nexport function manageAccount() {\n return Rownd.manageAccount();\n}\n\nexport function getAccessToken(): Promise<string> {\n return Rownd.getAccessToken();\n}\n\nexport function setUserDataValue(key: string, value: any) {\n return Rownd.setUserDataValue(\n key,\n Platform.OS === 'android' ? { value } : value\n );\n}\n\nexport function setUserData(data: Record<string, any>) {\n return Rownd.setUserData(data);\n}\n\nexport function handleSignInLink(url: string) {\n return Rownd.handleSignInLink(url);\n}\n"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,QAAxB,QAAwC,cAAxC;AAIA,OAAO,MAAMC,aAAa,GACvB,8EAAD,GACAD,QAAQ,CAACE,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJK;AAMP,OAAO,MAAMC,KAAK,GAAGN,aAAa,CAACO,WAAd,GACjBP,aAAa,CAACO,WADG,GAEjB,IAAIC,KAAJ,CACE,EADF,EAEE;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAJ,CAAUR,aAAV,CAAN;EACD;;AAHH,CAFF,CAFG;AAWP,OAAO,MAAMS,oBAAoB,GAC/BV,QAAQ,CAACW,EAAT,KAAgB,KAAhB,GACI,IADJ,GAEIZ,aAAa,CAACa,uBAAd,GACAb,aAAa,CAACa,uBADd,GAEA,IAAIL,KAAJ,CACE,EADF,EAEE;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAJ,CAAUR,aAAV,CAAN;EACD;;AAHH,CAFF,CALC;AAcP,OAAO,SAASY,SAAT,CAAmBC,MAAnB,EAAqD;EAC1D,OAAOT,KAAK,CAACQ,SAAN,CAAgBC,MAAhB,CAAP;AACD;AAED,OAAO,SAASC,cAAT,CAAwBC,mBAAxB,EAA6D;EAClE,OAAOX,KAAK,CAACU,cAAN,CAAqBC,mBAArB,CAAP;AACD;AAED,OAAO,SAASC,aAAT,CAAuBH,MAAvB,EAA+C;EACpD,IAAI,CAACA,MAAL,EAAa;
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","Rownd","RowndPlugin","Proxy","get","Error","IOSRowndEventEmitter","OS","RowndPluginEventEmitter","configure","config","customizations","customizationConfig","requestSignIn","method","postSignInRedirect","undefined","signOut","manageAccount","getAccessToken","setUserDataValue","key","value","setUserData","data","handleSignInLink","url"],"sources":["nativeModule.ts"],"sourcesContent":["import { NativeModules, Platform } from 'react-native';\nimport type { RequestSignIn } from 'src/hooks/rownd';\nimport type { Customizations, IConfig } from './config';\n\nexport const LINKING_ERROR =\n `The package '@rownd/react-native' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nexport const Rownd = NativeModules.RowndPlugin\n ? NativeModules.RowndPlugin\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport const IOSRowndEventEmitter =\n Platform.OS !== 'ios'\n ? null\n : NativeModules.RowndPluginEventEmitter\n ? NativeModules.RowndPluginEventEmitter\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nexport function configure(config: IConfig): Promise<string> {\n return Rownd.configure(config);\n}\n\nexport function customizations(customizationConfig: Customizations) {\n return Rownd.customizations(customizationConfig);\n}\n\nexport function requestSignIn(config?: RequestSignIn) {\n if (!config) {\n return Rownd.requestSignIn({ method: 'default' });\n }\n return Rownd.requestSignIn({\n method: config?.method || 'default',\n postSignInRedirect: config?.postSignInRedirect || undefined,\n });\n}\n\nexport function signOut() {\n return Rownd.signOut();\n}\n\nexport function manageAccount() {\n return Rownd.manageAccount();\n}\n\nexport function getAccessToken(): Promise<string> {\n return Rownd.getAccessToken();\n}\n\nexport function setUserDataValue(key: string, value: any) {\n return Rownd.setUserDataValue(\n key,\n Platform.OS === 'android' ? { value } : value\n );\n}\n\nexport function setUserData(data: Record<string, any>) {\n return Rownd.setUserData(data);\n}\n\nexport function handleSignInLink(url: string) {\n return Rownd.handleSignInLink(url);\n}\n"],"mappings":"AAAA,SAASA,aAAT,EAAwBC,QAAxB,QAAwC,cAAxC;AAIA,OAAO,MAAMC,aAAa,GACvB,8EAAD,GACAD,QAAQ,CAACE,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJK;AAMP,OAAO,MAAMC,KAAK,GAAGN,aAAa,CAACO,WAAd,GACjBP,aAAa,CAACO,WADG,GAEjB,IAAIC,KAAJ,CACE,EADF,EAEE;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAJ,CAAUR,aAAV,CAAN;EACD;;AAHH,CAFF,CAFG;AAWP,OAAO,MAAMS,oBAAoB,GAC/BV,QAAQ,CAACW,EAAT,KAAgB,KAAhB,GACI,IADJ,GAEIZ,aAAa,CAACa,uBAAd,GACAb,aAAa,CAACa,uBADd,GAEA,IAAIL,KAAJ,CACE,EADF,EAEE;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAJ,CAAUR,aAAV,CAAN;EACD;;AAHH,CAFF,CALC;AAcP,OAAO,SAASY,SAAT,CAAmBC,MAA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
|
package/package.json
CHANGED
package/src/utils/config.ts
CHANGED
|
@@ -43,7 +43,7 @@ export function customizations(customizationConfig: Customizations) {
|
|
|
43
43
|
|
|
44
44
|
export function requestSignIn(config?: RequestSignIn) {
|
|
45
45
|
if (!config) {
|
|
46
|
-
Rownd.requestSignIn({ method: 'default' });
|
|
46
|
+
return Rownd.requestSignIn({ method: 'default' });
|
|
47
47
|
}
|
|
48
48
|
return Rownd.requestSignIn({
|
|
49
49
|
method: config?.method || 'default',
|