diff --git a/packages/frontend/src/pages/miauth.vue b/packages/frontend/src/pages/miauth.vue index 391587e5b..39352da36 100644 --- a/packages/frontend/src/pages/miauth.vue +++ b/packages/frontend/src/pages/miauth.vue @@ -50,7 +50,6 @@ import * as os from '@/os.js'; import { $i, login } from '@/account.js'; import { i18n } from '@/i18n.js'; import { definePageMetadata } from '@/scripts/page-metadata.js'; -import { appendQuery, query } from '@/scripts/url.js'; const props = defineProps<{ session: string; @@ -77,8 +76,9 @@ async function accept(): Promise { if (props.callback) { const cbUrl = new URL(props.callback); if (['javascript:', 'file:', 'data:', 'mailto:', 'tel:'].includes(cbUrl.protocol)) throw new Error('invalid url'); - console.log(props.callback, props.session); - location.href = appendQuery(props.callback, query({ session: props.session })); + cbUrl.searchParams.set('session', props.session); + console.log(cbUrl.href); + location.href = cbUrl.href; } }