Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/routes/console/account/deleteMfa.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,18 @@
</script>

<Modal
title="Delete authentication provider"
title="Delete authentication method"
bind:show={showDelete}
onSubmit={deleteProvider}
icon="exclamation"
state="warning"
bind:error
headerDivider={false}>
<p>Are you sure you want to delete this authentication method from your account?</p>
<p class="u-bold">
Deleting the authentication method will disable multi-factor authentication for your
account. To re-enable it, you'll need to add a new authentication method.
</p>
<p>Enter the 6-digit verification code generated by your authenticator app to continue.</p>
<FormList>
<InputDigits autofocus required bind:value={code} />
</FormList>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
import { Modal } from '$lib/components';
import { Dependencies } from '$lib/constants';
import { Button } from '$lib/elements/forms';
import FormList from '$lib/elements/forms/formList.svelte';
import InputDigits from '$lib/elements/forms/inputDigits.svelte';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { AuthenticatorType } from '@appwrite.io/console';
import { user } from './store';

export let showDelete = false;

let code: string;
let error: string;

async function deleteProvider() {
Expand All @@ -34,23 +31,23 @@
}

$: if (showDelete) {
code = '';
error = '';
}
</script>

<Modal
title="Delete authentication provider"
title="Delete authentication method"
bind:show={showDelete}
onSubmit={deleteProvider}
icon="exclamation"
state="warning"
bind:error
headerDivider={false}>
<p class="u-bold">
Deleting the authentication method will disable multi-factor authentication for this
account. To re-enable it, user will need to add a new authentication method.
</p>
<p>Are you sure you want to delete this authentication method from your account?</p>
<FormList>
<InputDigits autofocus required bind:value={code} />
</FormList>

<svelte:fragment slot="footer">
<Button text on:click={() => (showDelete = false)}>Cancel</Button>
Expand Down