feat(editor): SSO onboarding (#5756)

* feat(editor): SSO onboarding

* fix(editor): add SAML onboarding page

* fix(editor): submit user name on SAML onboarding
This commit is contained in:
Csaba Tuncsik
2023-04-04 18:18:16 +02:00
committed by GitHub
parent 2b06673b2e
commit 04f8600bbd
5 changed files with 86 additions and 1 deletions

View File

@@ -0,0 +1,44 @@
<script lang="ts" setup>
import { reactive, ref } from 'vue';
import { IFormBoxConfig } from 'n8n-design-system';
import AuthView from '@/views/AuthView.vue';
import { i18n as locale } from '@/plugins/i18n';
import { useSSOStore } from '@/stores/sso';
const ssoStore = useSSOStore();
const loading = ref(false);
const FORM_CONFIG: IFormBoxConfig = reactive({
title: locale.baseText('auth.signup.setupYourAccount'),
buttonText: locale.baseText('auth.signup.finishAccountSetup'),
inputs: [
{
name: 'firstName',
properties: {
label: locale.baseText('auth.firstName'),
maxlength: 32,
required: true,
autocomplete: 'given-name',
capitalize: true,
},
},
{
name: 'lastName',
properties: {
label: locale.baseText('auth.lastName'),
maxlength: 32,
required: true,
autocomplete: 'family-name',
capitalize: true,
},
},
],
});
const onSubmit = (values: { firstName: string; lastName: string }) => {
ssoStore.updateUser(values);
};
</script>
<template>
<AuthView :form="FORM_CONFIG" :formLoading="loading" @submit="onSubmit" />
</template>