enhance(SSO): ユーザーに対話型プロンプトが表示されないように設定できるように (MisskeyIO#759)
This commit is contained in:
parent
a73a09a999
commit
8f66f9ca59
4 changed files with 17 additions and 5 deletions
|
@ -33,7 +33,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick } from 'vue';
|
||||
import { ref, nextTick, onMounted } from 'vue';
|
||||
import MkSignin from '@/components/MkSignin.vue';
|
||||
import MkButton from '@/components/MkButton.vue';
|
||||
import { $i, login } from '@/account.js';
|
||||
|
@ -47,6 +47,7 @@ if (transactionIdMeta) {
|
|||
}
|
||||
const name = document.querySelector<HTMLMetaElement>('meta[name="misskey:sso:service-name"]')?.content;
|
||||
const kind = document.querySelector<HTMLMetaElement>('meta[name="misskey:sso:kind"]')?.content;
|
||||
const prompt = document.querySelector<HTMLMetaElement>('meta[name="misskey:sso:prompt"]')?.content;
|
||||
|
||||
const loading = ref(false);
|
||||
const postBindingForm = ref<HTMLFormElement | null>(null);
|
||||
|
@ -90,6 +91,12 @@ async function authorize(): Promise<void> {
|
|||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if ($i && prompt === 'none') {
|
||||
onAccept();
|
||||
}
|
||||
});
|
||||
|
||||
definePageMetadata(() => ({
|
||||
title: 'Single Sign-On',
|
||||
icon: 'ti ti-apps',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue