@ofidj/node 3.15.0 → 3.17.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 +18 -0
- package/bpInfo.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -67,6 +67,24 @@ while this support is beta:
|
|
|
67
67
|
- `beginLogin({prompt: 'login'})` forces a fresh credential check, for an app
|
|
68
68
|
that wants one before a sensitive action.
|
|
69
69
|
|
|
70
|
+
## Passkey sign-in (3.15.0)
|
|
71
|
+
|
|
72
|
+
The browser runs the ceremony; the SDK carries the HTTP side, so it stays
|
|
73
|
+
usable in Node.
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
const {options, ticket} = await sdk.passkeyLoginOptions();
|
|
77
|
+
const response = await passkeyAssertion(options); // @ofidj/entry/dom
|
|
78
|
+
await sdk.loginWithPasskey(ticket, response); // same session as login()
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`loginWithPasskey` trades the answer for a two-minute grant, then mints the three
|
|
82
|
+
tokens with `Authorization: Passkey <grant>` exactly as `login` does with a
|
|
83
|
+
password — including the agreement rule: a `409 agreement_required` is answered
|
|
84
|
+
by a second ceremony with `{termsAccepted: true, termsVersion}`. Adding and
|
|
85
|
+
removing passkeys is plain `sendOnEndpoint({key: 'me', relativePath:
|
|
86
|
+
'passkeys…'})` on a signed-in Fidj session.
|
|
87
|
+
|
|
70
88
|
## Explicit app agreement on login
|
|
71
89
|
|
|
72
90
|
Call `login(email, password)` first. When the account owes this app its
|
package/bpInfo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.bpInfo = void 0;
|
|
4
|
-
exports.bpInfo = { version: 'v3.
|
|
4
|
+
exports.bpInfo = { version: 'v3.17.0' };
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnBJbmZvLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2JwSW5mby50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLE1BQU0sR0FBRyxFQUFDLE9BQU8sRUFBRSxTQUFTLEVBQUMsQ0FBQyJ9
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ofidj/node",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.17.0",
|
|
4
4
|
"author": "fidj",
|
|
5
5
|
"description": "fidj node tools ",
|
|
6
6
|
"keywords": [],
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"test-coverage": "nyc npm run test"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@ofidj/contracts": "^3.
|
|
43
|
+
"@ofidj/contracts": "^3.17.0",
|
|
44
44
|
"axios": "1.20.0",
|
|
45
45
|
"base-64": "^1.0.0",
|
|
46
46
|
"oauth4webapi": "3.8.2"
|