miauthのcallback urlをsearchParams.setで作るように (#9470)

This commit is contained in:
tamaina 2023-01-05 17:18:32 +09:00 committed by GitHub
parent 9734ad42a1
commit ded8584fdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -44,7 +44,6 @@ import MkSignin from '@/components/MkSignin.vue';
import MkButton from '@/components/MkButton.vue';
import * as os from '@/os';
import { $i, login } from '@/account';
import { appendQuery, query } from '@/scripts/url';
import { i18n } from '@/i18n';
const props = defineProps<{
@ -70,9 +69,9 @@ async function accept(): Promise<void> {
state = 'accepted';
if (props.callback) {
location.href = appendQuery(props.callback, query({
session: props.session,
}));
const cbUrl = new URL(props.callback);
cbUrl.searchParams.set('session', props.session);
location.href = cbUrl.href;
}
}