feat: complete onboarding flow
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { deriveKey } from '~/utils/crypto';
|
||||
|
||||
const { signIn } = useAuth();
|
||||
const { signIn, fetchSession } = useAuth();
|
||||
|
||||
definePageMeta({
|
||||
layout: 'auth',
|
||||
@@ -127,8 +127,11 @@ const submit = async () => {
|
||||
const key = await deriveKey(form.password, res.data.user.id);
|
||||
localStorage.setItem('encryptionKey', JSON.stringify(key));
|
||||
|
||||
// straight on to connecting a provider, the instance is useless without one
|
||||
return navigateTo('/welcome');
|
||||
// the next steps are for admins only, so make sure the role is loaded
|
||||
await fetchSession();
|
||||
|
||||
// on to the rest of the setup: who can register, then a first provider
|
||||
return navigateTo('/setup/instance');
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -160,6 +163,8 @@ const submit = async () => {
|
||||
</div>
|
||||
|
||||
<template v-else>
|
||||
<OnboardingSetupSteps :current="1"></OnboardingSetupSteps>
|
||||
|
||||
<p
|
||||
class="px-3 py-2.5 rounded-lg bg-[var(--bg-container)] border border-[var(--color-border)] text-sm leading-snug text-[var(--text-secondary)]">
|
||||
No accounts exist yet. The account you create here becomes the
|
||||
|
||||
Reference in New Issue
Block a user