react-native-oauth-essentials 1.0.6 → 1.0.9
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.
|
@@ -64,8 +64,8 @@ public class OauthEssentialsModule: NSObject {
|
|
|
64
64
|
"PASSWORD_SUPPORTED": passwordSupported,
|
|
65
65
|
"GOOGLE_PLAY_SERVICES_SUPPORTED": false, // Not applicable on iOS, it does not have Google Play Services
|
|
66
66
|
"APPLE_ID_SUPPORTED": appleIdSupported,
|
|
67
|
-
"HYBRID_SUPPORTED":
|
|
68
|
-
"
|
|
67
|
+
"HYBRID_SUPPORTED": passwordSupported || appleIdSupported,
|
|
68
|
+
"PASSKEYS_SUPPORTED": passkeySupported
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// PasskeyRetriever.swift
|
|
3
|
+
// Pods
|
|
4
|
+
//
|
|
5
|
+
// Created by Lucas on 12/02/26.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
|
|
1
9
|
import AuthenticationServices
|
|
2
10
|
import React
|
|
3
11
|
|
|
@@ -96,11 +104,15 @@ public class PasskeyRetriever: RCTPromiseSettler,
|
|
|
96
104
|
}
|
|
97
105
|
|
|
98
106
|
if let excludeCredentials = json["excludeCredentials"] as? [[String: Any]] {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
107
|
+
if #available(iOS 17.4, *) {
|
|
108
|
+
request.excludedCredentials = excludeCredentials.compactMap { cred in
|
|
109
|
+
guard let idStr = cred["id"] as? String,
|
|
110
|
+
let idData = base64URLDecode(idStr) else { return nil }
|
|
111
|
+
return ASAuthorizationPlatformPublicKeyCredentialDescriptor(credentialID: idData)
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
// Fallback on earlier versions
|
|
115
|
+
}
|
|
104
116
|
}
|
|
105
117
|
|
|
106
118
|
return request
|
|
@@ -223,4 +235,4 @@ public class PasskeyRetriever: RCTPromiseSettler,
|
|
|
223
235
|
return .none
|
|
224
236
|
}
|
|
225
237
|
}
|
|
226
|
-
}
|
|
238
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-oauth-essentials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Essential Auth tools for every app.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -48,7 +48,15 @@
|
|
|
48
48
|
"keywords": [
|
|
49
49
|
"react-native",
|
|
50
50
|
"ios",
|
|
51
|
-
"android"
|
|
51
|
+
"android",
|
|
52
|
+
"oauth",
|
|
53
|
+
"auth",
|
|
54
|
+
"sign-in",
|
|
55
|
+
"sign",
|
|
56
|
+
"passkeys",
|
|
57
|
+
"web",
|
|
58
|
+
"autumn",
|
|
59
|
+
"credentials"
|
|
52
60
|
],
|
|
53
61
|
"repository": {
|
|
54
62
|
"type": "git",
|