@trust-proto/auth-node 0.2.2 → 0.2.3
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 +11 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,18 +55,17 @@ const auth = new LiberionAuth({
|
|
|
55
55
|
|
|
56
56
|
## Configuration
|
|
57
57
|
|
|
58
|
-
| Option
|
|
59
|
-
|
|
|
60
|
-
| `projectId`
|
|
61
|
-
| `secretCode`
|
|
62
|
-
| `port`
|
|
63
|
-
| `ssl`
|
|
64
|
-
| `debug`
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `onDecline` | `(info: DeclineInfo) => Promise<void>` | ❌ | - | Called when auth is declined |
|
|
58
|
+
| Option | Type | Required | Default | Description |
|
|
59
|
+
| ------------ | ----------------------------------------------- | -------- | ------------ | ------------------------------------ |
|
|
60
|
+
| `projectId` | `string` | ✅ | - | Project UUID from Liberion dashboard |
|
|
61
|
+
| `secretCode` | `string` | ✅ | - | Secret code for encryption |
|
|
62
|
+
| `port` | `number` | ❌ | `31313` | WebSocket server port |
|
|
63
|
+
| `ssl` | `SSLCredentials` | ❌ | - | SSL/TLS options for HTTPS server |
|
|
64
|
+
| `debug` | `boolean` | ❌ | `false` | Enable debug logging |
|
|
65
|
+
| `logger` | `ILogger` | ❌ | `NoOpLogger` | Custom logger instance |
|
|
66
|
+
| `onHello` | `(address: string) => Promise<boolean>` | ❌ | - | Check if user is registered |
|
|
67
|
+
| `onSuccess` | `(payload: AuthPayload) => Promise<AuthResult>` | ❌ | - | Called on successful auth |
|
|
68
|
+
| `onDecline` | `(info: DeclineInfo) => Promise<void>` | ❌ | - | Called when auth is declined |
|
|
70
69
|
|
|
71
70
|
## Callbacks
|
|
72
71
|
|