diff --git a/pkg/services/factors.go b/pkg/services/factors.go index 15b066c..21f538a 100644 --- a/pkg/services/factors.go +++ b/pkg/services/factors.go @@ -1,9 +1,10 @@ package services import ( + "fmt" + "code.smartsheep.studio/hydrogen/identity/pkg/database" "code.smartsheep.studio/hydrogen/identity/pkg/models" - "fmt" "github.com/google/uuid" "github.com/spf13/viper" ) @@ -51,7 +52,7 @@ func GetFactorCode(factor models.AuthFactor) (bool, error) { return true, err } - factor.Secret = uuid.NewString()[:8] + factor.Secret = uuid.NewString()[:6] if err := database.C.Save(&factor).Error; err != nil { return true, err } diff --git a/pkg/views/src/components/Copyright.vue b/pkg/views/src/components/Copyright.vue new file mode 100644 index 0000000..f3f6baa --- /dev/null +++ b/pkg/views/src/components/Copyright.vue @@ -0,0 +1,6 @@ + + + Copyright © {{ new Date().getFullYear() }} Solsynth + Powered by Hydrogen.Identity + + diff --git a/pkg/views/src/components/auth/AccountLocator.vue b/pkg/views/src/components/auth/AccountLocator.vue new file mode 100644 index 0000000..0e6be6c --- /dev/null +++ b/pkg/views/src/components/auth/AccountLocator.vue @@ -0,0 +1,59 @@ + + + + + + + + Something went wrong... {{ error }} + + + + + + Next + + + + + + + diff --git a/pkg/views/src/components/auth/FactorApplicator.vue b/pkg/views/src/components/auth/FactorApplicator.vue new file mode 100644 index 0000000..4571c5a --- /dev/null +++ b/pkg/views/src/components/auth/FactorApplicator.vue @@ -0,0 +1,120 @@ + + + + + Check your inbox! + + + + + + + Something went wrong... {{ error }} + + + + + + Next + + + + + + + diff --git a/pkg/views/src/components/auth/FactorPicker.vue b/pkg/views/src/components/auth/FactorPicker.vue new file mode 100644 index 0000000..730a5c5 --- /dev/null +++ b/pkg/views/src/components/auth/FactorPicker.vue @@ -0,0 +1,74 @@ + + + + + + + + + + + + Something went wrong... {{ error }} + + + + + + Next + + + + + + + diff --git a/pkg/views/src/router/index.ts b/pkg/views/src/router/index.ts index 994d293..d78ea4a 100644 --- a/pkg/views/src/router/index.ts +++ b/pkg/views/src/router/index.ts @@ -7,8 +7,17 @@ const router = createRouter({ { path: "/", component: MasterLayout, - children: [{ path: "/", name: "dashboard", component: () => import("@/views/dashboard.vue") }], + children: [ + { path: "/", name: "dashboard", component: () => import("@/views/dashboard.vue") }, + ], }, + { + path: "/auth", + children: [ + { path: "sign-in", name: "auth.sign-in", component: () => import("@/views/auth/sign-in.vue") }, + // { path: "sign-up", name: "auth.sign-up", component: () => import("@/views/auth/sign-up.vue") }, + ] + } ], }) diff --git a/pkg/views/src/views/auth/sign-in.vue b/pkg/views/src/views/auth/sign-in.vue new file mode 100644 index 0000000..81b30f0 --- /dev/null +++ b/pkg/views/src/views/auth/sign-in.vue @@ -0,0 +1,69 @@ + + + + + + + Sign in + Through sign in to access the entire Solar Network. + + + + + (panel = val)" + v-model:loading="loading" + v-model:factors="factors" + v-model:currentFactor="currentFactor" + v-model:challenge="challenge" + /> + + + + + + + + + + + + +@/components/Copyright.vue
Copyright © {{ new Date().getFullYear() }} Solsynth
Powered by Hydrogen.Identity
Check your inbox!
Through sign in to access the entire Solar Network.