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:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user