feat(auth): add password reset #178
Some checks are pending
Build Docker Image / Explore-Gitea-Actions (push) Successful in 46s
Build and Push Docker Image / Explore-Gitea-Actions (push) Waiting to run

This commit was merged in pull request #180.
This commit is contained in:
2024-09-13 15:49:30 +02:00
parent 6c1edcd0a8
commit 63ddf77d6a
7 changed files with 196 additions and 10 deletions

View File

@@ -5,7 +5,7 @@ import (
"net/url"
)
templ Register(mailCode string) {
templ Register(token string) {
<!DOCTYPE html>
<html lang="en">
<head>
@@ -15,7 +15,7 @@ templ Register(mailCode string) {
</head>
<body>
<h4>Thank you for Sign Up!</h4>
<p>Click <a href={ templ.URL(utils.BaseUrl + "/auth/verify-email?token=" + url.QueryEscape(mailCode)) }>here</a> to verify your account.</p>
<p>Click <a href={ templ.URL(utils.BaseUrl + "/auth/verify-email?token=" + url.QueryEscape(token)) }>here</a> to verify your account.</p>
<p>Kind regards</p>
</body>
</html>

View File

@@ -0,0 +1,22 @@
package mail;
import (
"me-fit/utils"
"net/url"
)
templ ResetPassword(token string) {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Reset Password</title>
</head>
<body>
<h4>Reset your password</h4>
<p>Click <a href={ templ.URL(utils.BaseUrl + "/auth/change-password?token=" + url.QueryEscape(token)) }>here</a> to change your password.</p>
<p>Kind regards</p>
</body>
</html>
}