Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable autoclose for sigstore confirmation page. #455

Merged
merged 1 commit into from Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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