mirror of
https://github.com/directus/directus.git
synced 2026-01-29 14:07:57 -05:00
fix the SSO login issue of bug 14325 (#14326)
This commit is contained in:
@@ -44,18 +44,22 @@ export default defineComponent({
|
||||
const { providers } = toRefs(props);
|
||||
const ssoProviders = ref<{ name: string; link: string; icon: string }[]>([]);
|
||||
|
||||
watch(providers, () => {
|
||||
ssoProviders.value = providers.value
|
||||
.filter((provider: AuthProvider) => AUTH_SSO_DRIVERS.includes(provider.driver))
|
||||
.map((provider: AuthProvider) => ({
|
||||
name: formatTitle(provider.name),
|
||||
link: `${getRootPath()}auth/login/${provider.name}?redirect=${window.location.href.replace(
|
||||
location.search,
|
||||
''
|
||||
)}?continue`,
|
||||
icon: provider.icon ?? 'account_circle',
|
||||
}));
|
||||
});
|
||||
watch(
|
||||
providers,
|
||||
() => {
|
||||
ssoProviders.value = providers.value
|
||||
.filter((provider: AuthProvider) => AUTH_SSO_DRIVERS.includes(provider.driver))
|
||||
.map((provider: AuthProvider) => ({
|
||||
name: formatTitle(provider.name),
|
||||
link: `${getRootPath()}auth/login/${provider.name}?redirect=${window.location.href.replace(
|
||||
location.search,
|
||||
''
|
||||
)}?continue`,
|
||||
icon: provider.icon ?? 'account_circle',
|
||||
}));
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
const errorFormatted = computed(() => {
|
||||
const validReasons = ['SIGN_OUT', 'SESSION_EXPIRED'];
|
||||
|
||||
Reference in New Issue
Block a user