@getauthui/core 0.1.16 → 0.1.17
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 +3 -3
- package/dist/{authui-user-button-BltpbIHw.js → authui-user-button-CfkLh8tP.js} +5 -7
- package/dist/authui.cdn.js +3 -3
- package/dist/authui.cdn.mjs +5 -7
- package/dist/authui.js +2 -2
- package/dist/components/authui-sign-in.d.ts.map +1 -1
- package/dist/react.js +1 -1
- package/dist/store.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
visibility: hidden;
|
|
16
16
|
}
|
|
17
17
|
</style>
|
|
18
|
-
<script type="module" src="https://unpkg.com/@getauthui/core@0.1.
|
|
18
|
+
<script type="module" src="https://unpkg.com/@getauthui/core@0.1.17"></script>
|
|
19
19
|
|
|
20
20
|
<authui-config
|
|
21
21
|
endpoint="https://cloud.appwrite.io/v1"
|
|
@@ -65,7 +65,7 @@ CDN:
|
|
|
65
65
|
visibility: hidden;
|
|
66
66
|
}
|
|
67
67
|
</style>
|
|
68
|
-
<script type="module" src="https://unpkg.com/@getauthui/core@0.1.
|
|
68
|
+
<script type="module" src="https://unpkg.com/@getauthui/core@0.1.17"></script>
|
|
69
69
|
```
|
|
70
70
|
|
|
71
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).
|
|
@@ -73,7 +73,7 @@ The `<style>` keeps `<authui-show>` and the buttons hidden until the module defi
|
|
|
73
73
|
The default CDN URL is an ESM module: it defines the elements but does **not** set `window.AuthUI`. For `AuthUI.init` / `AuthUI.on` from a classic script, use the IIFE build:
|
|
74
74
|
|
|
75
75
|
```html
|
|
76
|
-
<script src="https://unpkg.com/@getauthui/core@0.1.
|
|
76
|
+
<script src="https://unpkg.com/@getauthui/core@0.1.17/dist/authui.cdn.js"></script>
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
npm:
|
|
@@ -812,8 +812,7 @@ class qt {
|
|
|
812
812
|
user: null,
|
|
813
813
|
mfaFactors: null,
|
|
814
814
|
configured: !1,
|
|
815
|
-
configError: t
|
|
816
|
-
pending: { type: "notice", tone: "error", message: t }
|
|
815
|
+
configError: t
|
|
817
816
|
});
|
|
818
817
|
}
|
|
819
818
|
get isConfigured() {
|
|
@@ -943,8 +942,7 @@ class qt {
|
|
|
943
942
|
status: "signed-out",
|
|
944
943
|
user: null,
|
|
945
944
|
mfaFactors: null,
|
|
946
|
-
configError: a
|
|
947
|
-
pending: { type: "notice", tone: "error", message: a }
|
|
945
|
+
configError: a
|
|
948
946
|
});
|
|
949
947
|
} else
|
|
950
948
|
this.setState({ status: "signed-out", user: null, mfaFactors: null, configError: null }), t && this.emit("signed-out", void 0);
|
|
@@ -3327,10 +3325,10 @@ let x = class extends M {
|
|
|
3327
3325
|
const { status: e, pending: t } = this.auth;
|
|
3328
3326
|
e === "mfa-required" && this.step !== "mfa" && this.go("mfa");
|
|
3329
3327
|
const i = this.step === "reset-password" || t?.type === "reset-password" || this.recovery !== null;
|
|
3330
|
-
(e === "signed-in" || e === "signed-out") && !i && (this.step === "mfa" || this.step === "phone" || this.step === "email-otp" || this.step === "magic-url" || this.step === "forgot-password" || this.token !== null || this.challenge !== null || e === "signed-out") && (this.token = null, this.challenge = null, this.code = "", this.password = "", this.notice = null, this.go(this.view === "sign-up" ? "sign-up" : "sign-in")), t?.type === "reset-password" && this.step !== "reset-password" && (this.recovery = { userId: t.userId, secret: t.secret }, this.go("reset-password")), t?.type === "oauth-failed" && (this.notice = { tone: "error", message: this.t("errorOAuth") }), t?.type === "notice" && !this.notice && (this.notice = {
|
|
3328
|
+
(e === "signed-in" || e === "signed-out") && !i && (this.step === "mfa" || this.step === "phone" || this.step === "email-otp" || this.step === "magic-url" || this.step === "forgot-password" || this.token !== null || this.challenge !== null || e === "signed-out") && (this.token = null, this.challenge = null, this.code = "", this.password = "", this.notice = null, this.go(this.view === "sign-up" ? "sign-up" : "sign-in")), t?.type === "reset-password" && this.step !== "reset-password" && (this.recovery = { userId: t.userId, secret: t.secret }, this.go("reset-password")), t?.type === "oauth-failed" && (this.notice = { tone: "error", message: this.t("errorOAuth") }), t?.type === "notice" && !this.notice && (this.auth.configError && t.message === this.auth.configError || (this.notice = {
|
|
3331
3329
|
tone: t.tone === "error" ? "error" : t.tone,
|
|
3332
3330
|
message: t.message
|
|
3333
|
-
});
|
|
3331
|
+
}));
|
|
3334
3332
|
}
|
|
3335
3333
|
/** Navigate between screens and reset transient state. */
|
|
3336
3334
|
dismissNotice() {
|
|
@@ -3368,7 +3366,7 @@ let x = class extends M {
|
|
|
3368
3366
|
return r`
|
|
3369
3367
|
<div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
|
|
3370
3368
|
${this.renderHeader()}
|
|
3371
|
-
${this.notice ? r`<div class="alert alert-${this.notice.tone}" role="status">
|
|
3369
|
+
${this.notice && !(this.auth.configError && this.notice.message === this.auth.configError) ? r`<div class="alert alert-${this.notice.tone}" role="status">
|
|
3372
3370
|
${this.notice.tone === "success" ? o.checkCircle : this.notice.tone === "error" ? o.alert : o.info}
|
|
3373
3371
|
<div class="alert-body">${this.notice.message}</div>
|
|
3374
3372
|
<button
|