diff --git a/auth/assets/templates/inc_nav.html.tpl b/auth/assets/templates/inc_nav.html.tpl
index ccbaeb901..618569aef 100644
--- a/auth/assets/templates/inc_nav.html.tpl
+++ b/auth/assets/templates/inc_nav.html.tpl
@@ -18,11 +18,9 @@
Your profile
- {{ if .settings.LocalEnabled }}
- Security
+ Security
- {{ end }}
Login sessions
diff --git a/auth/assets/templates/security.html.tpl b/auth/assets/templates/security.html.tpl
new file mode 100644
index 000000000..163b0b329
--- /dev/null
+++ b/auth/assets/templates/security.html.tpl
@@ -0,0 +1,10 @@
+{{ template "inc_header.html.tpl" set . "activeNav" "security" }}
+
+{{ template "inc_footer.html.tpl" . }}
diff --git a/auth/handlers/handle_security.go b/auth/handlers/handle_security.go
new file mode 100644
index 000000000..f73d57071
--- /dev/null
+++ b/auth/handlers/handle_security.go
@@ -0,0 +1,10 @@
+package handlers
+
+import (
+ "github.com/cortezaproject/corteza-server/auth/request"
+)
+
+func (h *AuthHandlers) security(req *request.AuthReq) error {
+ req.Template = TmplSecurity
+ return nil
+}
diff --git a/auth/handlers/handler.go b/auth/handlers/handler.go
index 4d053ca90..bacd4c2ab 100644
--- a/auth/handlers/handler.go
+++ b/auth/handlers/handler.go
@@ -84,6 +84,7 @@ const (
TmplRequestPasswordReset = "request-password-reset.html.tpl"
TmplPasswordResetRequested = "password-reset-requested.html.tpl"
TmplResetPassword = "reset-password.html.tpl"
+ TmplSecurity = "security.html.tpl"
TmplProfile = "profile.html.tpl"
TmplSessions = "sessions.html.tpl"
TmplSignup = "signup.html.tpl"
diff --git a/auth/handlers/links.go b/auth/handlers/links.go
index 0252e0cad..20f19785a 100644
--- a/auth/handlers/links.go
+++ b/auth/handlers/links.go
@@ -7,7 +7,10 @@ type (
ConfirmEmail,
PendingEmailConfirmation,
Login,
+
+ Security,
ChangePassword,
+
RequestPasswordReset,
PasswordResetRequested,
ResetPassword,
@@ -34,6 +37,7 @@ func GetLinks() Links {
ConfirmEmail: "/auth/confirm-email",
PendingEmailConfirmation: "/auth/pending-email-confirmation",
Login: "/auth/login",
+ Security: "/auth/security",
ChangePassword: "/auth/change-password",
RequestPasswordReset: "/auth/request-password-reset",
PasswordResetRequested: "/auth/password-reset-requested",
diff --git a/auth/handlers/routes.go b/auth/handlers/routes.go
index 9e770c8e9..a3108bf84 100644
--- a/auth/handlers/routes.go
+++ b/auth/handlers/routes.go
@@ -69,6 +69,7 @@ func (h *AuthHandlers) MountHttpRoutes(r chi.Router) {
r.Get(l.ResetPassword, h.handle(h.onlyIfPasswordResetEnabled(h.resetPasswordForm)))
r.Post(l.ResetPassword, h.handle(h.onlyIfPasswordResetEnabled(authOnly(h.resetPasswordProc))))
+ r.Get(l.Security, h.handle(authOnly(h.security)))
r.Get(l.ChangePassword, h.handle(h.onlyIfLocalEnabled(authOnly(h.changePasswordForm))))
r.Post(l.ChangePassword, h.handle(h.onlyIfLocalEnabled(authOnly(h.changePasswordProc))))
})