Skip to content

Commit 9b02e3f

Browse files
committed
README: minor tweak to code examples for consistency
1 parent c1433f3 commit 9b02e3f

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ To register a new local account:
9090
```js
9191
import { getLockKey } from "..";
9292

93-
var key = await getLockKey({ addNewPasskey: true, });
93+
var key = await getLockKey({ addNewPasskey: true });
9494
```
9595

9696
The returned keypair result will also include a `localIdentity` property, with a unique ID (`string` value) for the local account. This local account ID should be stored by your application (in local-storage, cookie, etc):
@@ -147,7 +147,7 @@ var key = Object.fromEntries(
147147
If the `currentAccountID` (as shown above) is available, it should be used in subsequent calls to `getLockKey()` when re-obtaining the encryption/decryption keypair from the existing passkey:
148148

149149
```js
150-
var key = await getLockKey({ localIdentitity: currentAccountID, });
150+
var key = await getLockKey({ localIdentitity: currentAccountID });
151151
```
152152

153153
If you don't have (or the application loses) an account ID, call `listLocalIdentities()` (async) to receive an array of all registed local account IDs.
@@ -161,7 +161,10 @@ Users may prefer a more robust security setup (less chance of identity/data loss
161161
To prompt for adding a new passkey to an existing local account:
162162

163163
```js
164-
/*var key =*/ await getLockKey({ localIdentitity: currentAccountID, addNewPasskey: true, });
164+
/*var key =*/ await getLockKey({
165+
localIdentitity: currentAccountID,
166+
addNewPasskey: true
167+
});
165168
```
166169

167170
### Change lock-key cache lifetime
@@ -213,7 +216,7 @@ var key = await getLockKey({
213216
username: "a-local-username",
214217
displayName: "A Local Username",
215218
relyingPartyID: "myappdomain.tld",
216-
relyingPartyName: "My App",
219+
relyingPartyName: "My App"
217220
});
218221
```
219222

@@ -389,7 +392,7 @@ When registering a new local-account:
389392
```js
390393
var key = await getLockKey({
391394
addNewPasskey: true,
392-
useLockKey: existingLockKey,
395+
useLockKey: existingLockKey
393396
});
394397
key === existingLockKey; // true
395398
```
@@ -400,7 +403,7 @@ When resetting the key on an existing local-account:
400403
var key = await getLockKey({
401404
localIdentitity: currentAccountID,
402405
resetLockKey: true,
403-
useLockKey: existingLockKey,
406+
useLockKey: existingLockKey
404407
});
405408
key === existingLockKey; // true
406409
```

0 commit comments

Comments
 (0)