@getauthui/core 0.1.3 → 0.1.5
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 +25 -5
- package/dist/active-team.d.ts +4 -0
- package/dist/active-team.d.ts.map +1 -0
- package/dist/{authui-user-button-PQdLnij_.js → authui-user-button-BeDiMjWw.js} +1028 -635
- package/dist/authui.cdn.js +391 -250
- package/dist/authui.cdn.mjs +1785 -1392
- package/dist/authui.js +61 -49
- package/dist/components/authui-account.d.ts.map +1 -1
- package/dist/components/authui-config.d.ts +1 -1
- package/dist/components/authui-config.d.ts.map +1 -1
- package/dist/components/authui-show.d.ts +10 -0
- package/dist/components/authui-show.d.ts.map +1 -1
- package/dist/components/authui-sign-in.d.ts.map +1 -1
- package/dist/components/authui-user-button.d.ts +8 -0
- package/dist/components/authui-user-button.d.ts.map +1 -1
- package/dist/errors.d.ts +4 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/icons.d.ts +1 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/last-method.d.ts +13 -0
- package/dist/last-method.d.ts.map +1 -0
- package/dist/password-strength.d.ts +21 -0
- package/dist/password-strength.d.ts.map +1 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react.js +1 -1
- package/dist/store.d.ts +18 -0
- package/dist/store.d.ts.map +1 -1
- package/dist/styles/base.d.ts.map +1 -1
- package/dist/types.d.ts +30 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,11 +6,20 @@
|
|
|
6
6
|
**Drop-in authentication for Appwrite. One script tag, every sign-in method, MFA, sessions and account management, running on your own domain.**
|
|
7
7
|
|
|
8
8
|
```html
|
|
9
|
-
<
|
|
9
|
+
<style>
|
|
10
|
+
authui-show:not([ready]) {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
authui-button:not(:defined),
|
|
14
|
+
authui-user-button:not(:defined) {
|
|
15
|
+
visibility: hidden;
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
18
|
+
<script type="module" src="https://unpkg.com/@getauthui/core@0.1.5"></script>
|
|
10
19
|
|
|
11
20
|
<authui-config
|
|
12
21
|
endpoint="https://cloud.appwrite.io/v1"
|
|
13
|
-
project="
|
|
22
|
+
project="YOUR_PROJECT_ID"
|
|
14
23
|
methods="email-password magic-url oauth:google oauth:github"
|
|
15
24
|
></authui-config>
|
|
16
25
|
|
|
@@ -40,16 +49,27 @@ v2 runs inside your page. Its requests to Appwrite are indistinguishable from yo
|
|
|
40
49
|
- **Account management**: profile, email and phone verification, password change, active sessions, connected identities, security log, account deletion
|
|
41
50
|
- **Modal, inline or headless** usage, `<authui-show when="signed-in">` conditionals, React wrappers
|
|
42
51
|
- **Themeable**: Appwrite Console design system, dark mode that follows your page, CSS custom properties for everything, string overrides
|
|
43
|
-
- **Framework agnostic**: standard web components built with Lit, ~
|
|
52
|
+
- **Framework agnostic**: standard web components built with Lit, ~90 KB gzipped ESM on the CDN (~78 KB IIFE), including Lit and the full Appwrite SDK
|
|
44
53
|
|
|
45
54
|
## Install
|
|
46
55
|
|
|
47
56
|
CDN:
|
|
48
57
|
|
|
49
58
|
```html
|
|
50
|
-
<
|
|
59
|
+
<style>
|
|
60
|
+
authui-show:not([ready]) {
|
|
61
|
+
display: none;
|
|
62
|
+
}
|
|
63
|
+
authui-button:not(:defined),
|
|
64
|
+
authui-user-button:not(:defined) {
|
|
65
|
+
visibility: hidden;
|
|
66
|
+
}
|
|
67
|
+
</style>
|
|
68
|
+
<script type="module" src="https://unpkg.com/@getauthui/core@0.1.5"></script>
|
|
51
69
|
```
|
|
52
70
|
|
|
71
|
+
The `<style>` keeps `<authui-show>` and the buttons hidden until the module defines them. See [`<authui-show>`](https://getauthui.appwrite.network/docs/components/show).
|
|
72
|
+
|
|
53
73
|
npm:
|
|
54
74
|
|
|
55
75
|
```bash
|
|
@@ -61,7 +81,7 @@ import { AuthUI } from "@getauthui/core";
|
|
|
61
81
|
|
|
62
82
|
AuthUI.init({
|
|
63
83
|
endpoint: "https://cloud.appwrite.io/v1",
|
|
64
|
-
project: "
|
|
84
|
+
project: "YOUR_PROJECT_ID",
|
|
65
85
|
methods: { emailPassword: true, magicUrl: true, anonymous: true, oauth: ["google", "github"] },
|
|
66
86
|
branding: { name: "Acme", theme: "auto" },
|
|
67
87
|
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Persist the active Appwrite team id per project (client-only). */
|
|
2
|
+
export declare function getStoredActiveTeamId(project: string): string | null;
|
|
3
|
+
export declare function setStoredActiveTeamId(project: string, teamId: string | null): void;
|
|
4
|
+
//# sourceMappingURL=active-team.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"active-team.d.ts","sourceRoot":"","sources":["../src/active-team.ts"],"names":[],"mappings":"AAAA,qEAAqE;AAIrE,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOpE;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAQlF"}
|