feat: suppor tokenDelivery field for account reg

This commit is contained in:
2025-12-16 00:41:30 +00:00
parent bab6e24a0d
commit 3686f87377
6 changed files with 85 additions and 28 deletions

View File

@@ -32,10 +32,10 @@ func authCookies(c *fiber.Ctx) map[string]string {
return m
}
// setAuthCookies sets HTTP-only auth cookies with security settings derived from the request.
// SetAuthCookies sets HTTP-only auth cookies with security settings derived from the request.
// Secure flag is based on actual protocol (works automatically with proxies/tunnels),
// unless explicitly set in cfg.Secure.
func setAuthCookies(c *fiber.Ctx, accessToken, refreshToken string, cfg CookieConfig) {
func SetAuthCookies(c *fiber.Ctx, accessToken, refreshToken string, cfg CookieConfig) {
secure := c.Protocol() == "https"
accessTokenCookie := &fiber.Cookie{