@madauth/server 0.2.0-beta.2 → 0.3.0-beta.1
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/dist/bin.js +98 -31
- package/dist/{chunk-CNL562LZ.js → chunk-56MOVFO4.js} +24 -2
- package/dist/{chunk-XNBWZZHT.js → chunk-CD7Y4T66.js} +11 -9
- package/dist/{chunk-7CTAB3QV.js → chunk-DCDTO5LG.js} +2 -2
- package/dist/{chunk-6EJDVZCD.js → chunk-NPNM26J3.js} +9 -2
- package/dist/{chunk-5CKEMC6M.js → chunk-ODITZLMM.js} +218 -86
- package/dist/{chunk-YALS7OMV.js → chunk-ZSBKNV5W.js} +217 -122
- package/dist/{config-BkxADgtp.d.ts → config-DEBYi8hb.d.ts} +7 -6
- package/dist/dynamodb.js +1 -1
- package/dist/entry/azure.d.ts +3 -3
- package/dist/entry/azure.js +4 -4
- package/dist/entry/lambda.d.ts +3 -3
- package/dist/entry/lambda.js +4 -4
- package/dist/entry/node.d.ts +3 -3
- package/dist/entry/node.js +4 -4
- package/dist/index.d.ts +30 -7
- package/dist/index.js +15 -7
- package/dist/{schema-BSgYVRpd.d.ts → schema-3yhCc2jH.d.ts} +17 -9
- package/dist/sqlite.js +2 -2
- package/dist/standalone/azure.mjs +799 -564
- package/dist/standalone/lambda.mjs +799 -564
- package/dist/standalone/main.mjs +563 -328
- package/dist/store/dynamodb.d.ts +1 -1
- package/dist/store/sqlite.d.ts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +2 -0
- package/dist/user-BMWEWREH.d.ts +12 -0
- package/dist/verify.d.ts +1 -1
- package/dist/verify.js +1 -1
- package/dist/{webhook-ltwulgcB.d.ts → webhook-DCDP6SaE.d.ts} +1 -1
- package/dist/webhook.d.ts +1 -1
- package/dist/webhook.js +1 -1
- package/package.json +1 -1
- package/dist/user-C1A3BfOo.d.ts +0 -12
package/dist/store/dynamodb.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
|
|
2
|
-
import { S as StoreAdapter } from '../schema-
|
|
2
|
+
import { S as StoreAdapter } from '../schema-3yhCc2jH.js';
|
|
3
3
|
|
|
4
4
|
interface DynamoDbAdapterOptions {
|
|
5
5
|
/** The table, with the partition key `pk` and the sort key `sk` (both strings). */
|
package/dist/store/sqlite.d.ts
CHANGED
package/dist/testing.d.ts
CHANGED
package/dist/testing.js
CHANGED
|
@@ -14,6 +14,7 @@ function testUser(overrides = {}) {
|
|
|
14
14
|
sessionVersion: 0,
|
|
15
15
|
lastMailAt: 0,
|
|
16
16
|
wrongCodes: 0,
|
|
17
|
+
claims: null,
|
|
17
18
|
createdAt: 17e11,
|
|
18
19
|
...overrides
|
|
19
20
|
};
|
|
@@ -27,6 +28,7 @@ function testAccount(overrides = {}) {
|
|
|
27
28
|
secret: "hash",
|
|
28
29
|
failedAttempts: 0,
|
|
29
30
|
lockedUntil: 0,
|
|
31
|
+
email: null,
|
|
30
32
|
createdAt: 17e11,
|
|
31
33
|
...overrides
|
|
32
34
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** The signed-in user as returned to apps. */
|
|
2
|
+
interface MadauthUser {
|
|
3
|
+
/** Stable id (`usr_…`), the same whichever way the user signs in. */
|
|
4
|
+
id: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
picture?: string;
|
|
8
|
+
/** What admins attached to the user, e.g. `{ roles: ['admin'] }`. Absent without claims. */
|
|
9
|
+
claims?: Record<string, unknown>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type { MadauthUser as M };
|
package/dist/verify.d.ts
CHANGED
package/dist/verify.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Every `type` madAuth sends. */
|
|
2
|
-
declare const WEBHOOK_TYPES: readonly ["email.verify", "email.reset", "email.already_registered", "signup.before", "user.created", "email.verified", "
|
|
2
|
+
declare const WEBHOOK_TYPES: readonly ["email.verify", "email.reset", "email.already_registered", "signup.before", "user.created", "email.verified", "email.password_reset", "user.signed_in", "user.deleted", "user.claims_changed"];
|
|
3
3
|
type WebhookType = (typeof WEBHOOK_TYPES)[number];
|
|
4
4
|
/** How old a call may be before receivers reject it, so a captured call can't be replayed. */
|
|
5
5
|
declare const WEBHOOK_TOLERANCE_SECONDS: number;
|
package/dist/webhook.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as WEBHOOK_TOLERANCE_SECONDS, b as WEBHOOK_TYPES, c as WebhookType, g as generateWebhookSecret, s as signWebhook, v as verifyWebhook } from './webhook-
|
|
1
|
+
export { a as WEBHOOK_TOLERANCE_SECONDS, b as WEBHOOK_TYPES, c as WebhookType, g as generateWebhookSecret, s as signWebhook, v as verifyWebhook } from './webhook-DCDP6SaE.js';
|
package/dist/webhook.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@madauth/server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0-beta.1",
|
|
4
4
|
"description": "madAuth server: Google and e-mail & password sign-in with madAuth sessions, for Docker, AWS Lambda and Azure Functions.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "David Neuy",
|
package/dist/user-C1A3BfOo.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** The signed-in user as returned to apps. */
|
|
2
|
-
interface MadauthUser {
|
|
3
|
-
/** Stable id, e.g. `google:<sub>`. */
|
|
4
|
-
id: string;
|
|
5
|
-
email?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
picture?: string;
|
|
8
|
-
/** The roles of the user's e-mail address, e.g. `['admin']`. Absent without roles. */
|
|
9
|
-
roles?: string[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type { MadauthUser as M };
|