feat: support time_zone for user registration context

This commit is contained in:
Ilia Denisov
2026-04-09 09:00:06 +02:00
parent e6b73a8f55
commit 7043af4cb3
40 changed files with 3452 additions and 164 deletions
+10
View File
@@ -79,6 +79,11 @@ type ConfirmEmailCodeInput struct {
// ClientPublicKey is the standard base64-encoded raw 32-byte Ed25519 public
// key that should be registered for the created device session.
ClientPublicKey string `json:"client_public_key"`
// TimeZone is the client-selected IANA time zone name forwarded to the
// Auth / Session Service as registration context for first-time user
// creation.
TimeZone string `json:"time_zone"`
}
// ConfirmEmailCodeResult describes the public REST and adapter payload
@@ -391,6 +396,11 @@ func validateConfirmEmailCodeInput(input *ConfirmEmailCodeInput) error {
return errors.New("client_public_key must not be empty")
}
input.TimeZone = strings.TrimSpace(input.TimeZone)
if input.TimeZone == "" {
return errors.New("time_zone must not be empty")
}
return nil
}