@hotosm/hanko-auth 0.4.3 → 0.4.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/dist/hanko-auth.esm.js +15 -5
- package/dist/hanko-auth.iife.js +9 -9
- package/dist/hanko-auth.umd.js +1 -1
- package/package.json +2 -1
- package/src/hanko-auth.ts +23 -0
- package/src/hanko-i18n-es.ts +2 -0
- package/src/hanko-i18n-fr.ts +2 -0
- package/src/hanko-i18n-pt.ts +2 -0
package/dist/hanko-auth.esm.js
CHANGED
|
@@ -4563,7 +4563,8 @@ const ps = {
|
|
|
4563
4563
|
value_too_short_error: "El valor es demasiado corto.",
|
|
4564
4564
|
webauthn_credential_invalid_mfa_only: "Esta credencial solo se puede usar como clave de seguridad de segundo factor.",
|
|
4565
4565
|
webauthn_credential_already_exists: "La solicitud expiró, se canceló o el dispositivo ya está registrado. Inténtelo de nuevo o intente usar otro dispositivo.",
|
|
4566
|
-
platform_authenticator_required: "Su cuenta está configurada para usar autenticadores de plataforma, pero su dispositivo o navegador actual no admite esta función. Inténtelo de nuevo con un dispositivo o navegador compatible."
|
|
4566
|
+
platform_authenticator_required: "Su cuenta está configurada para usar autenticadores de plataforma, pero su dispositivo o navegador actual no admite esta función. Inténtelo de nuevo con un dispositivo o navegador compatible.",
|
|
4567
|
+
third_party_access_denied: "Acceso denegado por el proveedor de terceros. Por favor, inténtelo de nuevo."
|
|
4567
4568
|
}
|
|
4568
4569
|
}, ms = {
|
|
4569
4570
|
headlines: {
|
|
@@ -4747,7 +4748,8 @@ const ps = {
|
|
|
4747
4748
|
value_too_short_error: "La valeur est trop courte.",
|
|
4748
4749
|
webauthn_credential_invalid_mfa_only: "Cette credential ne peut être utilisée que comme clé de sécurité de second facteur.",
|
|
4749
4750
|
webauthn_credential_already_exists: "La demande a expiré, a été annulée ou l'appareil est déjà enregistré. Réessayez ou essayez d'utiliser un autre appareil.",
|
|
4750
|
-
platform_authenticator_required: "Votre compte est configuré pour utiliser des authentificateurs de plateforme, mais votre appareil ou navigateur actuel ne prend pas en charge cette fonctionnalité. Réessayez avec un appareil ou navigateur compatible."
|
|
4751
|
+
platform_authenticator_required: "Votre compte est configuré pour utiliser des authentificateurs de plateforme, mais votre appareil ou navigateur actuel ne prend pas en charge cette fonctionnalité. Réessayez avec un appareil ou navigateur compatible.",
|
|
4752
|
+
third_party_access_denied: "Accès refusé par le fournisseur tiers. Veuillez réessayer."
|
|
4751
4753
|
}
|
|
4752
4754
|
}, gs = {
|
|
4753
4755
|
headlines: {
|
|
@@ -4931,7 +4933,8 @@ const ps = {
|
|
|
4931
4933
|
value_too_short_error: "O valor é muito curto.",
|
|
4932
4934
|
webauthn_credential_invalid_mfa_only: "Esta credencial só pode ser usada como chave de segurança de segundo fator.",
|
|
4933
4935
|
webauthn_credential_already_exists: "A solicitação expirou, foi cancelada ou o dispositivo já está registrado. Tente novamente ou tente usar outro dispositivo.",
|
|
4934
|
-
platform_authenticator_required: "Sua conta está configurada para usar autenticadores de plataforma, mas seu dispositivo ou navegador atual não suporta esse recurso. Tente novamente com um dispositivo ou navegador compatível."
|
|
4936
|
+
platform_authenticator_required: "Sua conta está configurada para usar autenticadores de plataforma, mas seu dispositivo ou navegador atual não suporta esse recurso. Tente novamente com um dispositivo ou navegador compatível.",
|
|
4937
|
+
third_party_access_denied: "Acesso negado pelo provedor de terceiros. Por favor, tente novamente."
|
|
4935
4938
|
}
|
|
4936
4939
|
}, Vn = {
|
|
4937
4940
|
en: {
|
|
@@ -5049,7 +5052,7 @@ let ce = class extends Mt {
|
|
|
5049
5052
|
if (!this._isPrimary) return;
|
|
5050
5053
|
const e = n;
|
|
5051
5054
|
!this.showProfile && !this.user && ((t = e.detail) != null && t.user) && (this.log("🔔 External login detected, updating user state..."), this.user = e.detail.user, this._broadcastState(), this.osmRequired && this.checkOSMConnection());
|
|
5052
|
-
};
|
|
5055
|
+
}, this._currentHankoAuthElement = null;
|
|
5053
5056
|
}
|
|
5054
5057
|
toggleDropdown() {
|
|
5055
5058
|
this.isOpen = !this.isOpen, this.isOpen ? setTimeout(() => {
|
|
@@ -5370,11 +5373,18 @@ let ce = class extends Mt {
|
|
|
5370
5373
|
this.log("⚠️ Could not fetch profile:", n);
|
|
5371
5374
|
}
|
|
5372
5375
|
}
|
|
5376
|
+
updated(n) {
|
|
5377
|
+
super.updated(n), n.has("user") && this.user === null && this.showProfile && (this.log("🔄 User logged out, re-attaching event listeners..."), this._currentHankoAuthElement = null, this.setupEventListeners());
|
|
5378
|
+
}
|
|
5373
5379
|
setupEventListeners() {
|
|
5374
5380
|
this.updateComplete.then(() => {
|
|
5375
5381
|
var e;
|
|
5376
5382
|
const n = (e = this.shadowRoot) == null ? void 0 : e.querySelector("hanko-auth");
|
|
5377
|
-
n &&
|
|
5383
|
+
if (n && n === this._currentHankoAuthElement) {
|
|
5384
|
+
this.log("⏭️ Event listeners already attached to this element");
|
|
5385
|
+
return;
|
|
5386
|
+
}
|
|
5387
|
+
n && (this._currentHankoAuthElement = n, this.log("🎯 Attaching event listeners to hanko-auth element"), n.addEventListener("onSessionCreated", (t) => {
|
|
5378
5388
|
var i, a;
|
|
5379
5389
|
this.log("🎯 Hanko event: onSessionCreated", t.detail);
|
|
5380
5390
|
const o = (a = (i = t.detail) == null ? void 0 : i.claims) == null ? void 0 : a.session_id;
|