34
34
1. **Webdev install technique**
35
35
Install the package into your project:
36
36
```sh
37
- npm install @authlocal /authlocal
37
+ npm install @e280 /authlocal
38
38
```
39
39
Write this in your app's js entrypoint (like `main.ts`):
40
40
```ts
41
- import {install} from "@authlocal /authlocal"
41
+ import {install} from "@e280 /authlocal"
42
42
const auth = await install()
43
43
auth.on(login => console.log("auth", login))
44
44
```
@@ -59,7 +59,7 @@ Use this technique if you want to make your own UI, and don't want to load any o
59
59
60
60
1. Create the Auth object manually, and trigger the initial load from storage:
61
61
```ts
62
- import {Auth} from "@authlocal /authlocal"
62
+ import {Auth} from "@e280 /authlocal"
63
63
64
64
const auth = new Auth()
65
65
await auth.loadLogin()
@@ -161,7 +161,7 @@ If the user clicks the sigil, the full thumbprint is copied to the clipboard.
161
161
162
162
### Sign a claim
163
163
``` js
164
- import {Future } from " @authlocal /authlocal"
164
+ import {Future } from " @e280 /authlocal"
165
165
166
166
const claimToken = await login .signClaim ({
167
167
@@ -175,7 +175,7 @@ const claimToken = await login.signClaim({
175
175
176
176
### Verify a claim
177
177
``` js
178
- import {verifyClaim } from " @authlocal /authlocal"
178
+ import {verifyClaim } from " @e280 /authlocal"
179
179
180
180
const {claim , proof } = await verifyClaim ({
181
181
claimToken,
@@ -245,7 +245,7 @@ Your server verifies the proof, then the claim — proving the user authorized t
245
245
246
246
#### Thumbprint conversions
247
247
``` ts
248
- import {Thumbprint } from " @authlocal /authlocal"
248
+ import {Thumbprint } from " @e280 /authlocal"
249
249
```
250
250
- ** id to thumbprint**
251
251
``` ts
0 commit comments