mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2026-03-17 20:22:02 +00:00
feat: add version information to login screen
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
"tinyauth/internal/auth"
|
||||
"tinyauth/internal/constants"
|
||||
"tinyauth/internal/docker"
|
||||
"tinyauth/internal/hooks"
|
||||
"tinyauth/internal/providers"
|
||||
@@ -565,6 +566,9 @@ func (h *Handlers) AppHandler(c *gin.Context) {
|
||||
ForgotPasswordMessage: h.Config.ForgotPasswordMessage,
|
||||
BackgroundImage: h.Config.BackgroundImage,
|
||||
OAuthAutoRedirect: h.Config.OAuthAutoRedirect,
|
||||
Version: constants.Version,
|
||||
BuildTimestamp: constants.BuildTimestamp,
|
||||
CommitHash: constants.CommitHash,
|
||||
}
|
||||
|
||||
// Return app context
|
||||
|
||||
@@ -218,6 +218,9 @@ func TestAppContext(t *testing.T) {
|
||||
BackgroundImage: "https://example.com/image.png",
|
||||
OAuthAutoRedirect: "none",
|
||||
Domain: "localhost",
|
||||
Version: "development",
|
||||
BuildTimestamp: "n/a",
|
||||
CommitHash: "n/a",
|
||||
}
|
||||
|
||||
// We should get the username back
|
||||
|
||||
@@ -54,6 +54,9 @@ type AppContext struct {
|
||||
ForgotPasswordMessage string `json:"forgotPasswordMessage"`
|
||||
BackgroundImage string `json:"backgroundImage"`
|
||||
OAuthAutoRedirect string `json:"oauthAutoRedirect"`
|
||||
Version string `json:"version"`
|
||||
BuildTimestamp string `json:"buildTimestamp"`
|
||||
CommitHash string `json:"commitHash"`
|
||||
}
|
||||
|
||||
// Totp request is the request for the totp endpoint
|
||||
|
||||
Reference in New Issue
Block a user