Skip to content

Commit

Permalink
fix(frontend): MkSignin.vueのcredentialRequestからReactivityを削除 (#14223)
Browse files Browse the repository at this point in the history
* Remove reactivity from credentialRequest in MkSignin.vue

* Update Changelog
  • Loading branch information
edo-bari-ikutsu authored Jul 15, 2024
1 parent 1001277 commit 3b075c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- Fix: テーマプレビューが見れない問題を修正
- Fix: ショートカットキーが連打できる問題を修正
(Cherry-picked from https://github.com/taiyme/misskey/pull/234)
- Fix: MkSignin.vueのcredentialRequestからReactivityを削除(ProxyがPasskey認証処理に渡ることを避けるため)

### Server
- Feat: レートリミット制限に引っかかったときに`Retry-After`ヘッダーを返すように (#13949)
Expand Down
10 changes: 5 additions & 5 deletions packages/frontend/src/components/MkSignin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const host = ref(toUnicode(configHost));
const totpLogin = ref(false);
const isBackupCode = ref(false);
const queryingKey = ref(false);
const credentialRequest = ref<CredentialRequestOptions | null>(null);
let credentialRequest: CredentialRequestOptions | null = null;

const emit = defineEmits<{
(ev: 'login', v: any): void;
Expand Down Expand Up @@ -122,14 +122,14 @@ function onLogin(res: any): Promise<void> | void {
}

async function queryKey(): Promise<void> {
if (credentialRequest.value == null) return;
if (credentialRequest == null) return;
queryingKey.value = true;
await webAuthnRequest(credentialRequest.value)
await webAuthnRequest(credentialRequest)
.catch(() => {
queryingKey.value = false;
return Promise.reject(null);
}).then(credential => {
credentialRequest.value = null;
credentialRequest = null;
queryingKey.value = false;
signing.value = true;
return misskeyApi('signin', {
Expand Down Expand Up @@ -160,7 +160,7 @@ function onSubmit(): void {
}).then(res => {
totpLogin.value = true;
signing.value = false;
credentialRequest.value = parseRequestOptionsFromJSON({
credentialRequest = parseRequestOptionsFromJSON({
publicKey: res,
});
})
Expand Down

0 comments on commit 3b075c9

Please sign in to comment.