@dfns/sdk-react-native 0.4.0-alpha.2 → 0.4.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.
Files changed (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -14,7 +14,7 @@ const b64UrlSafeToStandard = (urlSafe) => {
14
14
  };
15
15
  // react-native-passkey is incorrect encoding the credId with standard base64 for
16
16
  // some reason. we have to undo that.
17
- class Android {
17
+ class AndroidPasskeys {
18
18
  constructor(options) {
19
19
  this.options = options;
20
20
  }
@@ -27,7 +27,7 @@ class Android {
27
27
  transports: transports ?? [],
28
28
  })),
29
29
  rpId: challenge.rp.id,
30
- userVerification: 'preferred',
30
+ userVerification: challenge.userVerification,
31
31
  timeout: this.options?.timeout ?? exports.DEFAULT_WAIT_TIMEOUT,
32
32
  };
33
33
  const credential = await react_native_passkey_1.Passkey.authenticate(request);
@@ -74,7 +74,7 @@ class Android {
74
74
  // react-native-passkey's iOS implementation is not WebAuthn spec compliant. all values
75
75
  // are standard base64 encoded instead of base64url encoded. we have to convert the
76
76
  // encoding in both directions.
77
- class iOS {
77
+ class iOSPasskeys {
78
78
  constructor(options) {
79
79
  this.options = options;
80
80
  }
@@ -135,10 +135,10 @@ class PasskeysSigner {
135
135
  constructor(options) {
136
136
  switch (react_native_1.Platform.OS) {
137
137
  case 'android':
138
- this.platform = new Android(options);
138
+ this.platform = new AndroidPasskeys(options);
139
139
  break;
140
140
  case 'ios':
141
- this.platform = new iOS(options);
141
+ this.platform = new iOSPasskeys(options);
142
142
  break;
143
143
  default:
144
144
  throw new sdk_1.DfnsError(-1, `${react_native_1.Platform.OS} is not supported`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dfns/sdk-react-native",
3
- "version": "0.4.0-alpha.2",
3
+ "version": "0.4.0",
4
4
  "dependencies": {
5
5
  "buffer": "6.0.3",
6
6
  "cross-fetch": "3.1.6",
@@ -9,7 +9,7 @@
9
9
  "uuid": "9.0.0"
10
10
  },
11
11
  "peerDependencies": {
12
- "@dfns/sdk": "0.4.0-alpha.2"
12
+ "@dfns/sdk": "0.4.0"
13
13
  },
14
14
  "main": "./index.js",
15
15
  "type": "commonjs"