From 09710d48a967b0365f05fd47a7d41df6a855578f Mon Sep 17 00:00:00 2001 From: Unbewohnte Date: Wed, 15 Jan 2025 16:18:10 +0300 Subject: [PATCH] FEATURE: Email verification process on account registration --- .gitignore | 1 + pages/base.html | 74 ++++++------ pages/index.html | 153 ++++++++++++------------- pages/register.html | 53 ++++++++- scripts/api.js | 3 + src/conf/conf.go | 47 ++++++-- src/db/db.go | 12 ++ src/db/user.go | 29 +++++ src/db/verification.go | 132 +++++++++++++++++++++ src/email/auth.go | 15 +++ src/email/email.go | 29 +++-- src/misc/codeNumeric.go | 16 +++ src/{encryption => misc}/encryption.go | 2 +- src/server/api_test.go | 4 +- src/server/endpoints.go | 129 +++++++++++++++++++-- src/server/server.go | 19 ++- src/server/validation.go | 30 ++++- 17 files changed, 596 insertions(+), 152 deletions(-) create mode 100644 src/db/verification.go create mode 100644 src/email/auth.go create mode 100644 src/misc/codeNumeric.go rename src/{encryption => misc}/encryption.go (98%) diff --git a/.gitignore b/.gitignore index c71deb9..affaeca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ dela.zip bin/ TODO +conf.json diff --git a/pages/base.html b/pages/base.html index 4fa47f3..2efd162 100644 --- a/pages/base.html +++ b/pages/base.html @@ -6,51 +6,55 @@ - dela + Dela - + -
-
-
- - - Dela - - +
+
+
+ + Dela + - + -
- +
+ +
+ Login + Sign-up +
+
+
-
- Login - Sign-up -
-
-
-
-
- - - {{ template "content" . }} - + + + +
+ {{ template "content" . }} +
+ @@ -100,4 +104,4 @@ document.addEventListener('DOMContentLoaded', async function() { }, false) -{{ end }} \ No newline at end of file +{{ end }} diff --git a/pages/index.html b/pages/index.html index 62f0b41..b9f11e1 100644 --- a/pages/index.html +++ b/pages/index.html @@ -3,91 +3,90 @@ {{ define "content" }} -
- -
- -
+ + +