@getauthui/core 0.1.0 → 0.1.2
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 +15 -15
- package/dist/{authui-user-button-3yi-kvES.js → authui-user-button-C64OcOdr.js} +893 -474
- package/dist/authui.cdn.js +227 -215
- package/dist/authui.cdn.mjs +6724 -3340
- package/dist/authui.js +46 -34
- package/dist/components/authui-account.d.ts +102 -0
- package/dist/components/authui-account.d.ts.map +1 -0
- package/dist/components/authui-button.d.ts +21 -0
- package/dist/components/authui-button.d.ts.map +1 -0
- package/dist/components/authui-config.d.ts +40 -0
- package/dist/components/authui-config.d.ts.map +1 -0
- package/dist/components/authui-modal.d.ts +38 -0
- package/dist/components/authui-modal.d.ts.map +1 -0
- package/dist/components/authui-show.d.ts +33 -0
- package/dist/components/authui-show.d.ts.map +1 -0
- package/dist/components/authui-sign-in.d.ts +83 -0
- package/dist/components/authui-sign-in.d.ts.map +1 -0
- package/dist/components/authui-user-button.d.ts +22 -0
- package/dist/components/authui-user-button.d.ts.map +1 -0
- package/dist/components/element.d.ts +32 -0
- package/dist/components/element.d.ts.map +1 -0
- package/dist/components/sign-in.styles.d.ts +2 -0
- package/dist/components/sign-in.styles.d.ts.map +1 -0
- package/dist/errors.d.ts +48 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/i18n.d.ts +8 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/icons.d.ts +38 -0
- package/dist/icons.d.ts.map +1 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/modal-controller.d.ts +7 -0
- package/dist/modal-controller.d.ts.map +1 -0
- package/dist/preview.d.ts +107 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/react/index.d.ts +53 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react.js +21 -25
- package/dist/store.d.ts +105 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/styles/base.d.ts +7 -0
- package/dist/styles/base.d.ts.map +1 -0
- package/dist/styles/tokens.d.ts +7 -0
- package/dist/styles/tokens.d.ts.map +1 -0
- package/dist/theme.d.ts +21 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/types.d.ts +233 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +4 -4
- package/dist/authui.d.ts +0 -743
- package/dist/react.d.ts +0 -395
package/README.md
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
methods="email-password magic-url oauth:google oauth:github"
|
|
15
15
|
></authui-config>
|
|
16
16
|
|
|
17
|
-
<authui-signed-out><authui-button>Sign in</authui-button></authui-
|
|
18
|
-
<authui-signed-in><authui-user-button></authui-user-button></authui-
|
|
17
|
+
<authui-show when="signed-out"><authui-button>Sign in</authui-button></authui-show>
|
|
18
|
+
<authui-show when="signed-in"><authui-user-button></authui-user-button></authui-show>
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
That is a complete login flow: OAuth buttons, email and password, sign up, forgot password, passwordless email and SMS, guest sessions, MFA challenges, and a full account screen behind the avatar.
|
|
@@ -38,9 +38,9 @@ v2 runs inside your page. Its requests to Appwrite are indistinguishable from yo
|
|
|
38
38
|
- **Guest sessions** with an upgrade path to a real account
|
|
39
39
|
- **MFA**: challenges during sign in, authenticator app enrollment with QR code, recovery codes, step-up verification for protected actions
|
|
40
40
|
- **Account management**: profile, email and phone verification, password change, active sessions, connected identities, security log, account deletion
|
|
41
|
-
- **Modal, inline or headless** usage, `<authui-signed-in>`
|
|
41
|
+
- **Modal, inline or headless** usage, `<authui-show when="signed-in">` conditionals, React wrappers
|
|
42
42
|
- **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, ~
|
|
43
|
+
- **Framework agnostic**: standard web components built with Lit, ~75 KB gzipped on the CDN including Lit and the full Appwrite SDK
|
|
44
44
|
|
|
45
45
|
## Install
|
|
46
46
|
|
|
@@ -74,17 +74,17 @@ Register your app's hostname as a **Web platform** in the Appwrite Console and e
|
|
|
74
74
|
|
|
75
75
|
## Components
|
|
76
76
|
|
|
77
|
-
| Element
|
|
78
|
-
|
|
|
79
|
-
| `<authui-config>`
|
|
80
|
-
| `<authui-modal>`
|
|
81
|
-
| `<authui-button>`
|
|
82
|
-
| `<authui-user-button>`
|
|
83
|
-
| `<authui-sign-in>`
|
|
84
|
-
| `<authui-account>`
|
|
85
|
-
| `<authui-
|
|
86
|
-
|
|
87
|
-
React: `import { AuthUIProvider, AuthUIButton, AuthUIUserButton,
|
|
77
|
+
| Element | Purpose |
|
|
78
|
+
| ------------------------ | ------------------------------------------------------------------------ |
|
|
79
|
+
| `<authui-config>` | Declarative configuration |
|
|
80
|
+
| `<authui-modal>` | Dialog that hosts sign-in and account screens (auto-created when needed) |
|
|
81
|
+
| `<authui-button>` | Opens the modal |
|
|
82
|
+
| `<authui-user-button>` | Avatar with account menu, or a sign-in button while signed out |
|
|
83
|
+
| `<authui-sign-in>` | Inline sign-in panel with every flow |
|
|
84
|
+
| `<authui-account>` | Inline account management |
|
|
85
|
+
| `<authui-show when="…">` | Render children only for matching auth states (`when`, `unless`) |
|
|
86
|
+
|
|
87
|
+
React: `import { AuthUIProvider, AuthUIButton, AuthUIUserButton, Show, useAuthUI } from "@getauthui/core/react"`.
|
|
88
88
|
|
|
89
89
|
## Repository layout
|
|
90
90
|
|