Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Sep 8, 2023
1 parent 3e1fec4 commit eda1e56
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/frontend/src/components/MkSignin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
import { defineAsyncComponent } from 'vue';
import { toUnicode } from 'punycode/';
import { UserDetailed } from 'misskey-js/built/entities';
import { supported as WebAuthnSupported, get as WebAuthnRequest, parseRequestOptionsFromJSON } from '@github/webauthn-json/browser-ponyfill';
import { supported as webAuthnSupported, get as webAuthnRequest, parseRequestOptionsFromJSON } from '@github/webauthn-json/browser-ponyfill';
import { showSuspendedDialog } from '@/scripts/show-suspended-dialog';
import MkButton from '@/components/MkButton.vue';
import MkInput from '@/components/MkInput.vue';
Expand Down Expand Up @@ -114,7 +114,7 @@ function onLogin(res: any): Promise<void> | void {

async function queryKey(): Promise<void> {
queryingKey = true;
await WebAuthnRequest(credentialRequest)
await webAuthnRequest(credentialRequest)
.catch(() => {
queryingKey = false;
return Promise.reject(null);
Expand Down Expand Up @@ -145,7 +145,7 @@ async function queryKey(): Promise<void> {
function onSubmit(): void {
signing = true;
if (!totpLogin && user && user.twoFactorEnabled) {
if (WebAuthnSupported() && user.securityKeys) {
if (webAuthnSupported() && user.securityKeys) {
os.api('signin', {
username,
password,
Expand Down
2 changes: 0 additions & 2 deletions packages/frontend/src/pages/settings/2fa.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<script lang="ts" setup>
import { ref, defineAsyncComponent } from 'vue';
import { supported as webAuthnSupported, create as webAuthnCreate, parseCreationOptionsFromJSON } from '@github/webauthn-json/browser-ponyfill';
import { hostname } from '@/config';
import { byteify, hexify, stringify } from '@/scripts/2fa';
import MkButton from '@/components/MkButton.vue';
import MkInfo from '@/components/MkInfo.vue';
import MkSwitch from '@/components/MkSwitch.vue';
Expand Down

0 comments on commit eda1e56

Please sign in to comment.