react-native-authsignal 2.12.0 → 2.13.0
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/android/build.gradle +8 -1
- package/android/src/main/java/com/authsignal/react/AuthsignalEmailModule.kt +1 -0
- package/android/src/main/java/com/authsignal/react/AuthsignalInAppModule.kt +1 -0
- package/android/src/main/java/com/authsignal/react/AuthsignalPasskeyModule.kt +1 -0
- package/android/src/main/java/com/authsignal/react/AuthsignalPushModule.kt +11 -0
- package/android/src/main/java/com/authsignal/react/AuthsignalQRCodeModule.kt +11 -0
- package/android/src/main/java/com/authsignal/react/AuthsignalSMSModule.kt +1 -0
- package/android/src/main/java/com/authsignal/react/AuthsignalTOTPModule.kt +1 -0
- package/android/src/main/java/com/authsignal/react/AuthsignalWhatsappModule.kt +1 -0
- package/android/src/main/java/com/authsignal/react/JsonConversion.kt +98 -0
- package/android/src/main/java/com/authsignal/react/RequestMetadata.kt +13 -0
- package/ios/AuthsignalEmailModule.swift +1 -0
- package/ios/AuthsignalInAppModule.swift +1 -0
- package/ios/AuthsignalPasskeyModule.swift +1 -0
- package/ios/AuthsignalPushModule.swift +5 -2
- package/ios/AuthsignalQRModule.swift +3 -0
- package/ios/AuthsignalSMSModule.swift +1 -0
- package/ios/AuthsignalTOTPModule.swift +1 -0
- package/ios/AuthsignalWhatsappModule.swift +1 -0
- package/ios/RequestMetadata.swift +14 -0
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/types.d.ts +7 -0
- package/lib/typescript/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-native-authsignal.podspec +1 -1
- package/src/types.ts +8 -0
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import groovy.json.JsonSlurper
|
|
2
|
+
|
|
1
3
|
apply plugin: 'com.android.library'
|
|
2
4
|
apply plugin: 'org.jetbrains.kotlin.android'
|
|
3
5
|
apply plugin: 'com.facebook.react'
|
|
4
6
|
|
|
7
|
+
def packageJson = new JsonSlurper().parseText(file("../package.json").text)
|
|
8
|
+
|
|
5
9
|
def getExtOrDefault(name) {
|
|
6
10
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['Authsignal_' + name]
|
|
7
11
|
}
|
|
@@ -24,6 +28,7 @@ android {
|
|
|
24
28
|
defaultConfig {
|
|
25
29
|
minSdkVersion getExtOrIntegerDefault('minSdkVersion')
|
|
26
30
|
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
|
|
31
|
+
buildConfigField "String", "VERSION_NAME", "\"${packageJson.version}\""
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
buildTypes {
|
|
@@ -61,5 +66,7 @@ dependencies {
|
|
|
61
66
|
|
|
62
67
|
implementation "androidx.browser:browser:1.2.0"
|
|
63
68
|
|
|
64
|
-
implementation("com.authsignal:authsignal-android:3.
|
|
69
|
+
implementation("com.authsignal:authsignal-android:3.10.0")
|
|
70
|
+
|
|
71
|
+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3")
|
|
65
72
|
}
|
|
@@ -21,6 +21,7 @@ class AuthsignalInAppModule(private val reactContext: ReactApplicationContext) :
|
|
|
21
21
|
|
|
22
22
|
@ReactMethod
|
|
23
23
|
override fun initialize(tenantID: String, baseURL: String, promise: Promise) {
|
|
24
|
+
RequestMetadata.configure()
|
|
24
25
|
authsignal = AuthsignalInApp(tenantID, baseURL, context = reactContext)
|
|
25
26
|
|
|
26
27
|
promise.resolve(null)
|
|
@@ -24,6 +24,7 @@ class AuthsignalPasskeyModule(private val reactContext: ReactApplicationContext)
|
|
|
24
24
|
val activity = reactContext.currentActivity
|
|
25
25
|
|
|
26
26
|
if (activity != null) {
|
|
27
|
+
RequestMetadata.configure()
|
|
27
28
|
authsignal = AuthsignalPasskey(tenantID, baseURL, activity, deviceID)
|
|
28
29
|
}
|
|
29
30
|
|
|
@@ -21,6 +21,7 @@ class AuthsignalPushModule(private val reactContext: ReactApplicationContext) :
|
|
|
21
21
|
|
|
22
22
|
@ReactMethod
|
|
23
23
|
override fun initialize(tenantID: String, baseURL: String, promise: Promise) {
|
|
24
|
+
RequestMetadata.configure()
|
|
24
25
|
authsignal = AuthsignalPush(tenantID, baseURL)
|
|
25
26
|
|
|
26
27
|
promise.resolve(null)
|
|
@@ -119,6 +120,16 @@ class AuthsignalPushModule(private val reactContext: ReactApplicationContext) :
|
|
|
119
120
|
map.putString("ipAddress", challenge.ipAddress)
|
|
120
121
|
map.putString("deviceId", challenge.deviceId)
|
|
121
122
|
map.putString("userAgent", challenge.userAgent)
|
|
123
|
+
challenge.custom?.let { custom ->
|
|
124
|
+
map.putMap("custom", JsonConversion.toWritableMap(custom))
|
|
125
|
+
}
|
|
126
|
+
challenge.user?.let { user ->
|
|
127
|
+
val userMap = Arguments.createMap()
|
|
128
|
+
user.custom?.let { custom ->
|
|
129
|
+
userMap.putMap("custom", JsonConversion.toWritableMap(custom))
|
|
130
|
+
}
|
|
131
|
+
map.putMap("user", userMap)
|
|
132
|
+
}
|
|
122
133
|
promise.resolve(map)
|
|
123
134
|
}
|
|
124
135
|
}
|
|
@@ -21,6 +21,7 @@ class AuthsignalQRCodeModule(private val reactContext: ReactApplicationContext)
|
|
|
21
21
|
|
|
22
22
|
@ReactMethod
|
|
23
23
|
override fun initialize(tenantID: String, baseURL: String, promise: Promise) {
|
|
24
|
+
RequestMetadata.configure()
|
|
24
25
|
authsignal = AuthsignalQRCode(tenantID, baseURL)
|
|
25
26
|
|
|
26
27
|
promise.resolve(null)
|
|
@@ -114,6 +115,16 @@ class AuthsignalQRCodeModule(private val reactContext: ReactApplicationContext)
|
|
|
114
115
|
data.ipAddress?.let { map.putString("ipAddress", it) }
|
|
115
116
|
data.actionCode?.let { map.putString("actionCode", it) }
|
|
116
117
|
data.idempotencyKey?.let { map.putString("idempotencyKey", it) }
|
|
118
|
+
data.custom?.let { custom ->
|
|
119
|
+
map.putMap("custom", JsonConversion.toWritableMap(custom))
|
|
120
|
+
}
|
|
121
|
+
data.user?.let { user ->
|
|
122
|
+
val userMap = Arguments.createMap()
|
|
123
|
+
user.custom?.let { custom ->
|
|
124
|
+
userMap.putMap("custom", JsonConversion.toWritableMap(custom))
|
|
125
|
+
}
|
|
126
|
+
map.putMap("user", userMap)
|
|
127
|
+
}
|
|
117
128
|
promise.resolve(map)
|
|
118
129
|
}
|
|
119
130
|
}
|
|
@@ -23,6 +23,7 @@ class AuthsignalWhatsappModule(private val reactContext: ReactApplicationContext
|
|
|
23
23
|
val currentActivity = reactContext.currentActivity
|
|
24
24
|
|
|
25
25
|
if (currentActivity != null) {
|
|
26
|
+
RequestMetadata.configure()
|
|
26
27
|
authsignal = AuthsignalWhatsApp(tenantID, baseURL)
|
|
27
28
|
}
|
|
28
29
|
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
package com.authsignal.react
|
|
2
|
+
|
|
3
|
+
import com.facebook.react.bridge.Arguments
|
|
4
|
+
import com.facebook.react.bridge.WritableArray
|
|
5
|
+
import com.facebook.react.bridge.WritableMap
|
|
6
|
+
import kotlinx.serialization.json.JsonArray
|
|
7
|
+
import kotlinx.serialization.json.JsonNull
|
|
8
|
+
import kotlinx.serialization.json.JsonObject
|
|
9
|
+
import kotlinx.serialization.json.JsonPrimitive
|
|
10
|
+
import kotlinx.serialization.json.booleanOrNull
|
|
11
|
+
import kotlinx.serialization.json.doubleOrNull
|
|
12
|
+
import kotlinx.serialization.json.longOrNull
|
|
13
|
+
|
|
14
|
+
internal object JsonConversion {
|
|
15
|
+
fun toWritableMap(json: JsonObject): WritableMap {
|
|
16
|
+
val map = Arguments.createMap()
|
|
17
|
+
|
|
18
|
+
json.forEach { (key, value) ->
|
|
19
|
+
when (value) {
|
|
20
|
+
is JsonNull -> map.putNull(key)
|
|
21
|
+
is JsonPrimitive -> putPrimitive(map, key, value)
|
|
22
|
+
is JsonObject -> map.putMap(key, toWritableMap(value))
|
|
23
|
+
is JsonArray -> map.putArray(key, toWritableArray(value))
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return map
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private fun toWritableArray(json: JsonArray): WritableArray {
|
|
31
|
+
val array = Arguments.createArray()
|
|
32
|
+
|
|
33
|
+
json.forEach { value ->
|
|
34
|
+
when (value) {
|
|
35
|
+
is JsonNull -> array.pushNull()
|
|
36
|
+
is JsonPrimitive -> pushPrimitive(array, value)
|
|
37
|
+
is JsonObject -> array.pushMap(toWritableMap(value))
|
|
38
|
+
is JsonArray -> array.pushArray(toWritableArray(value))
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return array
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private fun putPrimitive(map: WritableMap, key: String, primitive: JsonPrimitive) {
|
|
46
|
+
if (primitive.isString) {
|
|
47
|
+
map.putString(key, primitive.content)
|
|
48
|
+
return
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
val boolean = primitive.booleanOrNull
|
|
52
|
+
if (boolean != null) {
|
|
53
|
+
map.putBoolean(key, boolean)
|
|
54
|
+
return
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
val long = primitive.longOrNull
|
|
58
|
+
if (long != null) {
|
|
59
|
+
map.putDouble(key, long.toDouble())
|
|
60
|
+
return
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
val double = primitive.doubleOrNull
|
|
64
|
+
if (double != null) {
|
|
65
|
+
map.putDouble(key, double)
|
|
66
|
+
return
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
map.putString(key, primitive.content)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
private fun pushPrimitive(array: WritableArray, primitive: JsonPrimitive) {
|
|
73
|
+
if (primitive.isString) {
|
|
74
|
+
array.pushString(primitive.content)
|
|
75
|
+
return
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
val boolean = primitive.booleanOrNull
|
|
79
|
+
if (boolean != null) {
|
|
80
|
+
array.pushBoolean(boolean)
|
|
81
|
+
return
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
val long = primitive.longOrNull
|
|
85
|
+
if (long != null) {
|
|
86
|
+
array.pushDouble(long.toDouble())
|
|
87
|
+
return
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
val double = primitive.doubleOrNull
|
|
91
|
+
if (double != null) {
|
|
92
|
+
array.pushDouble(double)
|
|
93
|
+
return
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
array.pushString(primitive.content)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
package com.authsignal.react
|
|
2
|
+
|
|
3
|
+
import com.authsignal.AuthsignalRequestMetadata
|
|
4
|
+
|
|
5
|
+
internal object RequestMetadata {
|
|
6
|
+
fun configure() {
|
|
7
|
+
AuthsignalRequestMetadata.setWrapperSDK(
|
|
8
|
+
sdk = "react-native",
|
|
9
|
+
version = BuildConfig.VERSION_NAME,
|
|
10
|
+
userAgentToken = "AuthsignalReactNativeSDK",
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -17,6 +17,7 @@ class AuthsignalEmailModule: NSObject {
|
|
|
17
17
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
18
18
|
reject: @escaping RCTPromiseRejectBlock
|
|
19
19
|
) -> Void {
|
|
20
|
+
RequestMetadata.configure()
|
|
20
21
|
self.authsignal = AuthsignalEmail(tenantID: tenantID as String, baseURL: baseURL as String)
|
|
21
22
|
|
|
22
23
|
resolve(nil)
|
|
@@ -17,6 +17,7 @@ class AuthsignalInAppModule: NSObject {
|
|
|
17
17
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
18
18
|
reject: @escaping RCTPromiseRejectBlock
|
|
19
19
|
) -> Void {
|
|
20
|
+
RequestMetadata.configure()
|
|
20
21
|
self.authsignal = AuthsignalInApp(tenantID: tenantID as String, baseURL: baseURL as String)
|
|
21
22
|
|
|
22
23
|
resolve(nil)
|
|
@@ -18,6 +18,7 @@ class AuthsignalPasskeyModule: NSObject {
|
|
|
18
18
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
19
19
|
reject: @escaping RCTPromiseRejectBlock
|
|
20
20
|
) -> Void {
|
|
21
|
+
RequestMetadata.configure()
|
|
21
22
|
self.authsignal = AuthsignalPasskey(tenantID: tenantID as String, baseURL: baseURL as String, deviceID: deviceID as String?)
|
|
22
23
|
|
|
23
24
|
resolve(nil)
|
|
@@ -17,6 +17,7 @@ class AuthsignalPushModule: NSObject {
|
|
|
17
17
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
18
18
|
reject: @escaping RCTPromiseRejectBlock
|
|
19
19
|
) -> Void {
|
|
20
|
+
RequestMetadata.configure()
|
|
20
21
|
self.authsignal = AuthsignalPush(tenantID: tenantID as String, baseURL: baseURL as String)
|
|
21
22
|
|
|
22
23
|
resolve(nil)
|
|
@@ -129,15 +130,17 @@ class AuthsignalPushModule: NSObject {
|
|
|
129
130
|
if let error = response.error {
|
|
130
131
|
reject(response.errorCode ?? "unexpected_error", error, nil)
|
|
131
132
|
} else if let data = response.data as? AppChallenge {
|
|
132
|
-
let challenge: [String:
|
|
133
|
+
let challenge: [String: Any?] = [
|
|
133
134
|
"challengeId": data.challengeId,
|
|
134
135
|
"actionCode": data.actionCode,
|
|
135
136
|
"idempotencyKey": data.idempotencyKey,
|
|
136
137
|
"userAgent": data.userAgent,
|
|
137
138
|
"deviceId": data.deviceId,
|
|
138
139
|
"ipAddress": data.ipAddress,
|
|
140
|
+
"custom": data.custom?.mapValues { $0.value },
|
|
141
|
+
"user": data.user.map { user in ["custom": user.custom?.mapValues { $0.value }] },
|
|
139
142
|
]
|
|
140
|
-
|
|
143
|
+
|
|
141
144
|
resolve(challenge)
|
|
142
145
|
} else {
|
|
143
146
|
resolve(nil)
|
|
@@ -17,6 +17,7 @@ class AuthsignalQRCodeModule: NSObject {
|
|
|
17
17
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
18
18
|
reject: @escaping RCTPromiseRejectBlock
|
|
19
19
|
) -> Void {
|
|
20
|
+
RequestMetadata.configure()
|
|
20
21
|
self.authsignal = AuthsignalQRCode(tenantID: tenantID as String, baseURL: baseURL as String)
|
|
21
22
|
|
|
22
23
|
resolve(nil)
|
|
@@ -137,6 +138,8 @@ class AuthsignalQRCodeModule: NSObject {
|
|
|
137
138
|
"ipAddress": data.ipAddress,
|
|
138
139
|
"actionCode": data.actionCode,
|
|
139
140
|
"idempotencyKey": data.idempotencyKey,
|
|
141
|
+
"custom": data.custom?.mapValues { $0.value },
|
|
142
|
+
"user": data.user.map { user in ["custom": user.custom?.mapValues { $0.value }] },
|
|
140
143
|
]
|
|
141
144
|
|
|
142
145
|
resolve(result)
|
|
@@ -17,6 +17,7 @@ class AuthsignalSMSModule: NSObject {
|
|
|
17
17
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
18
18
|
reject: @escaping RCTPromiseRejectBlock
|
|
19
19
|
) -> Void {
|
|
20
|
+
RequestMetadata.configure()
|
|
20
21
|
self.authsignal = AuthsignalSMS(tenantID: tenantID as String, baseURL: baseURL as String)
|
|
21
22
|
|
|
22
23
|
resolve(nil)
|
|
@@ -17,6 +17,7 @@ class AuthsignalTOTPModule: NSObject {
|
|
|
17
17
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
18
18
|
reject: @escaping RCTPromiseRejectBlock
|
|
19
19
|
) -> Void {
|
|
20
|
+
RequestMetadata.configure()
|
|
20
21
|
self.authsignal = AuthsignalTOTP(tenantID: tenantID as String, baseURL: baseURL as String)
|
|
21
22
|
|
|
22
23
|
resolve(nil)
|
|
@@ -17,6 +17,7 @@ class AuthsignalWhatsappModule: NSObject {
|
|
|
17
17
|
resolve: @escaping RCTPromiseResolveBlock,
|
|
18
18
|
reject: @escaping RCTPromiseRejectBlock
|
|
19
19
|
) -> Void {
|
|
20
|
+
RequestMetadata.configure()
|
|
20
21
|
self.authsignal = AuthsignalWhatsApp(tenantID: tenantID as String, baseURL: baseURL as String)
|
|
21
22
|
|
|
22
23
|
resolve(nil)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Authsignal
|
|
2
|
+
import Foundation
|
|
3
|
+
|
|
4
|
+
private let authsignalReactNativeVersion = "2.12.1"
|
|
5
|
+
|
|
6
|
+
enum RequestMetadata {
|
|
7
|
+
static func configure() {
|
|
8
|
+
AuthsignalRequestMetadata.setWrapperSDK(
|
|
9
|
+
"react-native",
|
|
10
|
+
version: authsignalReactNativeVersion,
|
|
11
|
+
userAgentToken: "AuthsignalReactNativeSDK"
|
|
12
|
+
)
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["KeychainAccess","exports","UserActionState"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"names":["KeychainAccess","exports","UserActionState"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":";;;;;;IAmJYA,cAAc,GAAAC,OAAA,CAAAD,cAAA;AAAA,WAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAAC,OAAA,CAAAD,cAAA,GAAdA,cAAc;AAAA,IAQdE,eAAe,GAAAD,OAAA,CAAAC,eAAA;AAAA,WAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;AAAA,GAAfA,eAAe,KAAAD,OAAA,CAAAC,eAAA,GAAfA,eAAe","ignoreList":[]}
|
package/lib/module/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["KeychainAccess","UserActionState"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"names":["KeychainAccess","UserActionState"],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"AAmJA,WAAYA,cAAc;AAMzB,WANWA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;AAAA,GAAdA,cAAc,KAAdA,cAAc;AAQ1B,WAAYC,eAAe;AAS1B,WATWA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;AAAA,GAAfA,eAAe,KAAfA,eAAe","ignoreList":[]}
|
|
@@ -52,6 +52,11 @@ export interface AppChallenge {
|
|
|
52
52
|
userAgent?: string;
|
|
53
53
|
deviceId?: string;
|
|
54
54
|
ipAddress?: string;
|
|
55
|
+
custom?: Record<string, unknown>;
|
|
56
|
+
user?: ChallengeUser;
|
|
57
|
+
}
|
|
58
|
+
export interface ChallengeUser {
|
|
59
|
+
custom?: Record<string, unknown>;
|
|
55
60
|
}
|
|
56
61
|
export interface AppCredential {
|
|
57
62
|
credentialId: string;
|
|
@@ -68,6 +73,8 @@ export interface ClaimChallengeResponse {
|
|
|
68
73
|
ipAddress?: string;
|
|
69
74
|
actionCode?: string;
|
|
70
75
|
idempotencyKey?: string;
|
|
76
|
+
custom?: Record<string, unknown>;
|
|
77
|
+
user?: ChallengeUser;
|
|
71
78
|
}
|
|
72
79
|
export interface UpdateChallengeInput {
|
|
73
80
|
challengeId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,GAAG,EAA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B;IACzD,6BAA6B,kCAAkC;CAChE;AAED,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,kBAAkB,uBAAuB;IACzC,mBAAmB,wBAAwB;IAC3C,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IACnC,gBAAgB,qBAAqB;IACrC,aAAa,kBAAkB;CAChC"}
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
|
|
|
18
18
|
s.private_header_files = "ios/**/*.h"
|
|
19
19
|
|
|
20
20
|
s.dependency "React-Core"
|
|
21
|
-
s.dependency 'Authsignal', '2.
|
|
21
|
+
s.dependency 'Authsignal', '~> 2.9.0'
|
|
22
22
|
|
|
23
23
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
24
24
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
package/src/types.ts
CHANGED
|
@@ -60,6 +60,12 @@ export interface AppChallenge {
|
|
|
60
60
|
userAgent?: string;
|
|
61
61
|
deviceId?: string;
|
|
62
62
|
ipAddress?: string;
|
|
63
|
+
custom?: Record<string, unknown>;
|
|
64
|
+
user?: ChallengeUser;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface ChallengeUser {
|
|
68
|
+
custom?: Record<string, unknown>;
|
|
63
69
|
}
|
|
64
70
|
|
|
65
71
|
export interface AppCredential {
|
|
@@ -79,6 +85,8 @@ export interface ClaimChallengeResponse {
|
|
|
79
85
|
ipAddress?: string;
|
|
80
86
|
actionCode?: string;
|
|
81
87
|
idempotencyKey?: string;
|
|
88
|
+
custom?: Record<string, unknown>;
|
|
89
|
+
user?: ChallengeUser;
|
|
82
90
|
}
|
|
83
91
|
|
|
84
92
|
export interface UpdateChallengeInput {
|