From ee6e7324b206775581a7507ff06bd33fcfa4eb4f Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 21 Apr 2024 01:33:42 +0800 Subject: [PATCH] :sparkles: An entire complete sign in user flow --- .idea/workspace.xml | 38 +++---- pkg/i18n/locale.en.json | 7 +- pkg/i18n/locale.zh.json | 7 +- pkg/server/startup.go | 2 +- pkg/server/ui/accounts.go | 7 ++ pkg/server/ui/index.go | 32 +++++- pkg/server/ui/mfa.go | 194 ++++++++++++++++++++++++++++++++ pkg/server/ui/signin.go | 26 ++++- pkg/server/ui/signup.go | 3 +- pkg/services/factors.go | 11 +- pkg/services/mfa.go | 18 +++ pkg/services/ticket.go | 35 ++++-- pkg/services/ticket_token.go | 4 +- pkg/utils/request.go | 14 +++ pkg/views/layouts/auth.gohtml | 2 - pkg/views/mfa-apply.gohtml | 47 ++++++++ pkg/views/mfa.gohtml | 61 ++++++++++ pkg/views/signin.gohtml | 2 +- pkg/views/signup.gohtml | 2 +- pkg/views/users/me/index.gohtml | 3 + settings.toml | 4 +- 21 files changed, 467 insertions(+), 52 deletions(-) create mode 100644 pkg/server/ui/accounts.go create mode 100644 pkg/server/ui/mfa.go create mode 100644 pkg/services/mfa.go create mode 100644 pkg/views/mfa-apply.gohtml create mode 100644 pkg/views/mfa.gohtml create mode 100644 pkg/views/users/me/index.gohtml diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 92b3f90..ae7f761 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,32 +4,28 @@