mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Update pink-svelte dependency to b91df47 and improve code quality
- Update @appwrite.io/pink-svelte to latest commit - Replace loose equality (==) with strict equality (===) - Add required attribute to InputDigits component
This commit is contained in:
1 parent
b998314893
commit
fe411a8a29
4 files changed
+11
-11
No files matched your search
@@ -3,7 +3,7 @@
|
||||
|
||||
export async function verify(challenge: Models.MfaChallenge, code: string) {
|
||||
try {
|
||||
if (challenge == null) {
|
||||
if (challenge === null) {
|
||||
challenge = await sdk.forConsole.account.createMfaChallenge(
|
||||
AuthenticationFactor.Totp
|
||||
);
|
||||
@@ -59,9 +59,9 @@
|
||||
|
||||
onMount(async () => {
|
||||
const enabledNonRecoveryFactors = enabledFactors.filter(
|
||||
([factor, _]) => factor != 'recoveryCode'
|
||||
([factor, _]) => factor !== 'recoveryCode'
|
||||
);
|
||||
if (enabledNonRecoveryFactors.length == 1) {
|
||||
if (enabledNonRecoveryFactors.length === 1) {
|
||||
if (factors.phone) {
|
||||
createChallenge(AuthenticationFactor.Phone);
|
||||
} else if (factors.email) {
|
||||
@@ -77,7 +77,7 @@
|
||||
</Typography.Text>
|
||||
<InputText id="recovery-code" bind:value={code} required autofocus />
|
||||
{:else}
|
||||
{#if factors.totp && (challengeType == AuthenticationFactor.Totp || challengeType == null)}
|
||||
{#if factors.totp && (challengeType === AuthenticationFactor.Totp || challengeType === null)}
|
||||
<Typography.Text align="center"
|
||||
>Enter below a 6-digit one-time code generated by your authentication app.</Typography.Text>
|
||||
{:else if challengeType === AuthenticationFactor.Email}
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
{/await}
|
||||
{:else}
|
||||
<label for="code">Enter the 6-digit one-time code generated by the app</label>
|
||||
<InputDigits bind:value={code} autofocus />
|
||||
<InputDigits required bind:value={code} autofocus />
|
||||
{/if}
|
||||
{/key}
|
||||
<svelte:fragment slot="footer">
|
||||
|
||||
Reference in new issue
Block a user