node build fixed

This commit is contained in:
ra_ma
2025-09-20 14:08:38 +01:00
parent c6ebbe069d
commit 3d298fa434
1516 changed files with 535727 additions and 2 deletions

View File

@@ -0,0 +1,19 @@
package core
import (
"seanime/internal/util"
"time"
)
// GetServerPasswordHMACAuth returns an HMAC authenticator using the hashed server password as the base secret
// This is used for server endpoints that don't use Nakama
func (a *App) GetServerPasswordHMACAuth() *util.HMACAuth {
var secret string
if a.Config != nil && a.Config.Server.Password != "" {
secret = a.ServerPasswordHash
} else {
secret = "seanime-default-secret"
}
return util.NewHMACAuth(secret, 24*time.Hour)
}