@polaris-auth/client 0.6.1 → 0.8.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 +61 -7
- package/dist/anonymous.d.ts +513 -0
- package/dist/anonymous.js +9 -0
- package/dist/index.d.ts +31 -2
- package/dist/index.js +21 -1
- package/dist/multi-session.d.ts +1104 -0
- package/dist/multi-session.js +13 -0
- package/dist/passkey.d.ts +2028 -0
- package/dist/passkey.js +19 -0
- package/dist/passwordless.d.ts +3353 -0
- package/dist/passwordless.js +31 -0
- package/dist/social.d.ts +2791 -0
- package/dist/social.js +23 -0
- package/dist/username.d.ts +674 -0
- package/dist/username.js +9 -0
- package/dist/webauthn.d.ts +27 -0
- package/dist/webauthn.js +129 -0
- package/openapi.json +3977 -1
- package/package.json +32 -3
- package/src/anonymous.ts +16 -0
- package/src/index.ts +37 -2
- package/src/multi-session.ts +20 -0
- package/src/passkey.ts +26 -0
- package/src/passwordless.ts +38 -0
- package/src/schema.d.ts +6264 -3317
- package/src/social.ts +30 -0
- package/src/username.ts +16 -0
- package/src/webauthn.ts +172 -0
package/dist/index.js
CHANGED
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
import createOpenApiClient from "openapi-fetch";
|
|
2
2
|
import { admin } from "./admin.js";
|
|
3
|
+
import { anonymous } from "./anonymous.js";
|
|
3
4
|
import { audit } from "./audit.js";
|
|
4
5
|
import { challengeRetry } from "./challenge.js";
|
|
6
|
+
import { multiSession } from "./multi-session.js";
|
|
7
|
+
import { passkey } from "./passkey.js";
|
|
8
|
+
import { passwordless } from "./passwordless.js";
|
|
5
9
|
import { sentinel } from "./sentinel.js";
|
|
6
10
|
import { scim } from "./scim.js";
|
|
11
|
+
import { social } from "./social.js";
|
|
7
12
|
import { sso } from "./sso.js";
|
|
13
|
+
import { username } from "./username.js";
|
|
8
14
|
export { admin } from "./admin.js";
|
|
15
|
+
export { anonymous } from "./anonymous.js";
|
|
9
16
|
export { audit } from "./audit.js";
|
|
10
17
|
export { challengeRetry } from "./challenge.js";
|
|
18
|
+
export { multiSession } from "./multi-session.js";
|
|
19
|
+
export { passkey } from "./passkey.js";
|
|
20
|
+
export { passwordless } from "./passwordless.js";
|
|
11
21
|
export { sentinel } from "./sentinel.js";
|
|
12
22
|
export { scim } from "./scim.js";
|
|
23
|
+
export { social } from "./social.js";
|
|
13
24
|
export { sso } from "./sso.js";
|
|
25
|
+
export { username } from "./username.js";
|
|
26
|
+
export { registerPasskey, signInWithPasskey, passkeyAssertion, passkeyAutofillAvailable } from "./webauthn.js";
|
|
14
27
|
/**
|
|
15
28
|
* An `openapi-fetch` client typed by `paths` (generated from `polaris manifest --format=openapi`), so
|
|
16
29
|
* `client.POST("/auth/login", { body })` checks the body and types `data` and `error`; the plugins' routes
|
|
17
|
-
* are also methods of `client.audit`, `client.admin`, `client.sentinel`, `client.sso
|
|
30
|
+
* are also methods of `client.audit`, `client.admin`, `client.sentinel`, `client.sso`, `client.scim`, `client.passwordless`,
|
|
31
|
+
* `client.username`, `client.anonymous`, `client.multiSession`, `client.social` and `client.passkey`; `challenge.captcha`
|
|
18
32
|
* answers a sentinel captcha challenge with one retry. No refresh loop and no storage: when to refresh
|
|
19
33
|
* and where to keep tokens is the application's policy.
|
|
20
34
|
*/
|
|
@@ -40,6 +54,12 @@ export function createClient(options) {
|
|
|
40
54
|
sentinel: sentinel(client),
|
|
41
55
|
sso: sso(client),
|
|
42
56
|
scim: scim(client),
|
|
57
|
+
passwordless: passwordless(client),
|
|
58
|
+
username: username(client),
|
|
59
|
+
anonymous: anonymous(client),
|
|
60
|
+
multiSession: multiSession(client),
|
|
61
|
+
social: social(client),
|
|
62
|
+
passkey: passkey(client),
|
|
43
63
|
withToken: (next) => createClient({ ...options, token: next }),
|
|
44
64
|
};
|
|
45
65
|
}
|