react-native-oauth-essentials 1.0.5 → 1.0.8

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": true,
68
- "PASSKEY_SUPPORTED": passkeySupported
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
- request.excludedCredentials = excludeCredentials.compactMap { cred in
100
- guard let idStr = cred["id"] as? String,
101
- let idData = base64URLDecode(idStr) else { return nil }
102
- return ASAuthorizationPlatformPublicKeyCredentialDescriptor(credentialID: idData)
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.5",
3
+ "version": "1.0.8",
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",
@@ -59,7 +59,7 @@
59
59
  "bugs": {
60
60
  "url": "https://github.com/lucaswitch/react-native-oauth-essentials/issues"
61
61
  },
62
- "homepage": "https://github.com/lucaswitch/react-native-oauth-essentials#readme",
62
+ "homepage": "https://lucaswitch.github.io/react-native-oauth-essentials/docs/intro",
63
63
  "publishConfig": {
64
64
  "registry": "https://registry.npmjs.org/"
65
65
  },