Skip to content

Commit

Permalink
Enable autoclose for sigstore confirmation page.
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Lynch <billy@chainguard.dev>
  • Loading branch information
wlynch committed Mar 4, 2024
1 parent c2ac22d commit cd0db91
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion internal/fulcio/identity.go
Expand Up @@ -194,8 +194,19 @@ func NewIdentityFactory(in io.Reader, out io.Writer) *IdentityFactory {

func (f *IdentityFactory) NewIdentity(ctx context.Context, cfg *config.Config) (*Identity, error) {
clientID := cfg.ClientID

// Autoclose only works if we don't go through the identity selection page
// (otherwise it'll show a countdown timer that doesn't work)
autoclose := false
if cfg.ConnectorID != "" {
autoclose = true
}
html, err := oauth.GetInteractiveSuccessHTML(autoclose, 6)
if err != nil {
return nil, fmt.Errorf("error generating interactive HTML: %w", err)
}
defaultFlow := &oauthflow.InteractiveIDTokenGetter{
HTMLPage: oauth.InteractiveSuccessHTML,
HTMLPage: html,
Input: f.in,
Output: f.out,
}
Expand Down

0 comments on commit cd0db91

Please sign in to comment.