Skip to content

Commit fb0d026

Browse files
Fix app attestation provider values to match backend enum
The backend validates provider against uppercase enum values (APP_ATTEST, PLAY_INTEGRITY). Renames enum members and updates native module mappings. Bumps native SDK deps (iOS 2.4.0-alpha.2, Android 3.4.1-alpha.2) and version to 2.8.0-alpha.2.
1 parent 8595729 commit fb0d026

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ dependencies {
6161

6262
implementation "androidx.browser:browser:1.2.0"
6363

64-
implementation("com.authsignal:authsignal-android:3.4.1-alpha.1")
64+
implementation("com.authsignal:authsignal-android:3.4.1-alpha.2")
6565
}

android/src/main/java/com/authsignal/react/AuthsignalInAppModule.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ class AuthsignalInAppModule(private val reactContext: ReactApplicationContext) :
6464
val appAttestation = appAttestationMap?.let { map ->
6565
val attestationToken = map.getString("token") ?: return@let null
6666
val provider = when (map.getString("provider")) {
67-
"playIntegrity" -> AppAttestationProvider.PLAY_INTEGRITY
67+
"PLAY_INTEGRITY" -> AppAttestationProvider.PLAY_INTEGRITY
68+
"APP_ATTEST" -> AppAttestationProvider.APP_ATTEST
6869
else -> AppAttestationProvider.PLAY_INTEGRITY
6970
}
7071
val keyId = if (map.hasKey("keyId")) map.getString("keyId") else null

ios/AuthsignalInAppModule.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class AuthsignalInAppModule: NSObject {
7777
if let dict = appAttestationDict,
7878
let attestationToken = dict["token"] as? String {
7979
appAttestation = AppAttestation(
80-
provider: .apple,
80+
provider: .appAttest,
8181
token: attestationToken,
8282
keyId: dict["keyId"] as? String
8383
)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-authsignal",
3-
"version": "2.8.0-alpha.1",
3+
"version": "2.8.0-alpha.2",
44
"description": "The official Authsignal React Native library.",
55
"main": "lib/commonjs/index",
66
"module": "lib/module/index",

react-native-authsignal.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
1818
s.private_header_files = "ios/**/*.h"
1919

2020
s.dependency "React-Core"
21-
s.dependency 'Authsignal', '2.4.0-alpha.1'
21+
s.dependency 'Authsignal', '2.4.0-alpha.2'
2222

2323
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
2424
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ export interface VerifyResponse {
4646
}
4747

4848
export enum AppAttestationProvider {
49-
apple = 'apple',
50-
playIntegrity = 'playIntegrity',
49+
appAttest = 'APP_ATTEST',
50+
playIntegrity = 'PLAY_INTEGRITY',
5151
}
5252

5353
export interface AppAttestation {

0 commit comments

Comments
 (0)