Refactor sign-in page and IAM service lifecycle

Redesign the sign-in page to show email/password form inline
with OIDC provider buttons (with vendor icons) instead of
separate pages. Extract OIDCProvider type to its own file.

Replace errgroup with sync.WaitGroup + WithCancelCause for
graceful shutdown in IAM services. Refactor garbage collectors
to use functional options and time.Ticker instead of
time.After to avoid repeated allocations.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-21 19:11:09 +01:00
parent 23084a72a2
commit 83468db034
11 changed files with 384 additions and 176 deletions

View File

@@ -67,14 +67,18 @@ func NewSAMLDomainVerifier(
func (v *SAMLDomainVerifier) Run(ctx context.Context) error {
v.logger.InfoCtx(ctx, "starting", log.Duration("interval", v.interval))
for {
v.runOnce(ctx)
v.runOnce(ctx)
ticker := time.NewTicker(v.interval)
defer ticker.Stop()
for {
select {
case <-ctx.Done():
v.logger.InfoCtx(ctx, "shutting down")
return ctx.Err()
case <-time.After(v.interval):
case <-ticker.C:
v.runOnce(ctx)
}
}
}