@rakomi/react-native 0.5.0 → 0.6.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/README.md +1 -0
- package/THIRD-PARTY-NOTICES +1 -1
- package/dist/index.cjs +9 -7
- package/dist/index.js +9 -7
- package/package.json +3 -3
- package/sbom.cdx.json +6 -6
package/README.md
CHANGED
|
@@ -211,6 +211,7 @@ have to branch:
|
|
|
211
211
|
| What happened | Code your UI handles |
|
|
212
212
|
|---|---|
|
|
213
213
|
| The user dismissed the sheet | `PASSKEY_CEREMONY_CANCELLED` |
|
|
214
|
+
| Nobody finished the sheet in time | `PASSKEY_CEREMONY_TIMED_OUT` — retryable; the SDK asked your module to cancel the request |
|
|
214
215
|
| The device cannot do passkeys, or no adapter is wired | `PASSKEY_NOT_SUPPORTED` |
|
|
215
216
|
| The credential is already registered for this user | `PASSKEY_ALREADY_REGISTERED` |
|
|
216
217
|
| The action needs a fresh re-authentication first | `PASSKEY_STEP_UP_REQUIRED` |
|
package/THIRD-PARTY-NOTICES
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
|
|
2
2
|
|
|
3
|
-
For the npm package: @rakomi/react-native@0.
|
|
3
|
+
For the npm package: @rakomi/react-native@0.6.0
|
|
4
4
|
|
|
5
5
|
This package's published bundle (`dist/`) INLINES the third-party components listed below.
|
|
6
6
|
Their copyright and permission notices are reproduced verbatim, as required by their licenses
|
package/dist/index.cjs
CHANGED
|
@@ -526,18 +526,20 @@ var TokenRuntime = class _TokenRuntime {
|
|
|
526
526
|
*
|
|
527
527
|
* uses `jose.createLocalJWKSet` so verification is purely local once
|
|
528
528
|
* the JWKS document has been fetched and cached. The cache is preloaded from `KeyValueStore`
|
|
529
|
-
* on cold-start (slot `jwks_cache`) and refreshed on TTL miss
|
|
529
|
+
* on cold-start (slot `jwks_cache`) and refreshed on TTL miss, or once when the token's `kid` is not in
|
|
530
|
+
* the cached set (a rotated key; rate-limited by a cooldown); on persistent network failure
|
|
530
531
|
* the stale-while-error fallback keeps verification working until the cached doc itself expires.
|
|
531
532
|
*/
|
|
532
533
|
async verifyAccessToken(token) {
|
|
533
534
|
try {
|
|
534
535
|
const cache = await this.getOrCreateJwksCache();
|
|
535
|
-
const
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
536
|
+
const result = await cache.withKeyRotationRetry(
|
|
537
|
+
(keySet) => jose.jwtVerify(token, keySet, {
|
|
538
|
+
issuer: this.expectedIssuer,
|
|
539
|
+
audience: this.expectedAudience,
|
|
540
|
+
algorithms: ["RS256"]
|
|
541
|
+
})
|
|
542
|
+
);
|
|
541
543
|
return { ok: true, payload: result.payload };
|
|
542
544
|
} catch (err2) {
|
|
543
545
|
return { ok: false, reason: err2 instanceof Error ? err2.message : "verify failed" };
|
package/dist/index.js
CHANGED
|
@@ -525,18 +525,20 @@ var TokenRuntime = class _TokenRuntime {
|
|
|
525
525
|
*
|
|
526
526
|
* uses `jose.createLocalJWKSet` so verification is purely local once
|
|
527
527
|
* the JWKS document has been fetched and cached. The cache is preloaded from `KeyValueStore`
|
|
528
|
-
* on cold-start (slot `jwks_cache`) and refreshed on TTL miss
|
|
528
|
+
* on cold-start (slot `jwks_cache`) and refreshed on TTL miss, or once when the token's `kid` is not in
|
|
529
|
+
* the cached set (a rotated key; rate-limited by a cooldown); on persistent network failure
|
|
529
530
|
* the stale-while-error fallback keeps verification working until the cached doc itself expires.
|
|
530
531
|
*/
|
|
531
532
|
async verifyAccessToken(token) {
|
|
532
533
|
try {
|
|
533
534
|
const cache = await this.getOrCreateJwksCache();
|
|
534
|
-
const
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
535
|
+
const result = await cache.withKeyRotationRetry(
|
|
536
|
+
(keySet) => jwtVerify(token, keySet, {
|
|
537
|
+
issuer: this.expectedIssuer,
|
|
538
|
+
audience: this.expectedAudience,
|
|
539
|
+
algorithms: ["RS256"]
|
|
540
|
+
})
|
|
541
|
+
);
|
|
540
542
|
return { ok: true, payload: result.payload };
|
|
541
543
|
} catch (err2) {
|
|
542
544
|
return { ok: false, reason: err2 instanceof Error ? err2.message : "verify failed" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rakomi/react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "React Native / Expo SDK for Rakomi authentication.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rakomi",
|
|
@@ -83,11 +83,11 @@
|
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@rakomi/react": "0.
|
|
86
|
+
"@rakomi/react": "0.6.0"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
89
|
"jose": "^6.2.3",
|
|
90
|
-
"@rakomi/sdk-core": "^0.
|
|
90
|
+
"@rakomi/sdk-core": "^0.6.0"
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|
|
93
93
|
"build": "NODE_OPTIONS=--max-old-space-size=4096 tsup",
|
package/sbom.cdx.json
CHANGED
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
},
|
|
27
27
|
"component": {
|
|
28
28
|
"type": "library",
|
|
29
|
-
"bom-ref": "pkg:npm/%40rakomi%2Freact-native@0.
|
|
29
|
+
"bom-ref": "pkg:npm/%40rakomi%2Freact-native@0.6.0",
|
|
30
30
|
"name": "@rakomi/react-native",
|
|
31
|
-
"version": "0.
|
|
32
|
-
"purl": "pkg:npm/%40rakomi%2Freact-native@0.
|
|
31
|
+
"version": "0.6.0",
|
|
32
|
+
"purl": "pkg:npm/%40rakomi%2Freact-native@0.6.0",
|
|
33
33
|
"licenses": [
|
|
34
34
|
{
|
|
35
35
|
"license": {
|
|
@@ -42,10 +42,10 @@
|
|
|
42
42
|
"components": [
|
|
43
43
|
{
|
|
44
44
|
"type": "library",
|
|
45
|
-
"bom-ref": "pkg:npm/@rakomi/sdk-core@0.
|
|
45
|
+
"bom-ref": "pkg:npm/@rakomi/sdk-core@0.6.0",
|
|
46
46
|
"name": "@rakomi/sdk-core",
|
|
47
|
-
"version": "0.
|
|
48
|
-
"purl": "pkg:npm/@rakomi/sdk-core@0.
|
|
47
|
+
"version": "0.6.0",
|
|
48
|
+
"purl": "pkg:npm/@rakomi/sdk-core@0.6.0",
|
|
49
49
|
"licenses": [
|
|
50
50
|
{
|
|
51
51
|
"license": {
|