From 4856699bd6a4c8c201c32779425b2e17c3295449 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Fri, 3 Nov 2023 00:21:06 +0100 Subject: [PATCH] upd: change the way miauth redirects --- packages/frontend/src/pages/miauth.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/pages/miauth.vue b/packages/frontend/src/pages/miauth.vue index e3cbcab08..3b49ac40a 100644 --- a/packages/frontend/src/pages/miauth.vue +++ b/packages/frontend/src/pages/miauth.vue @@ -50,6 +50,7 @@ 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; @@ -76,8 +77,7 @@ 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'); - cbUrl.searchParams.set('session', props.session); - location.href = cbUrl.href; + location.href = appendQuery(props.callback, query({ session: props.session })); } }