mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(core): Add OIDC support for SSO (#15988)
Co-authored-by: Andreas Fitzek <andreas.fitzek@n8n.io>
This commit is contained in:
@@ -2,14 +2,19 @@
|
||||
import { useSSOStore } from '@/stores/sso.store';
|
||||
import { useI18n } from '@n8n/i18n';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
|
||||
const i18n = useI18n();
|
||||
const ssoStore = useSSOStore();
|
||||
const toast = useToast();
|
||||
const settingsStore = useSettingsStore();
|
||||
|
||||
const onSSOLogin = async () => {
|
||||
try {
|
||||
window.location.href = await ssoStore.getSSORedirectUrl();
|
||||
const redirectUrl = ssoStore.isDefaultAuthenticationSaml
|
||||
? await ssoStore.getSSORedirectUrl()
|
||||
: settingsStore.settings.sso.oidc.loginUrl;
|
||||
window.location.href = redirectUrl;
|
||||
} catch (error) {
|
||||
toast.showError(error, 'Error', error.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user