Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Refer to new signup flow #342

Merged
merged 7 commits into from
Sep 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internals/secrethub/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ func NewApp() *App {
io := ui.NewUserIO()
store := NewCredentialConfig(io)
help := "The SecretHub command-line interface is a unified tool to manage your infrastructure secrets with SecretHub.\n\n" +
"If you do not yet have a SecretHub account, go here to create one:\n\n" +
" https://signup.secrethub.io/\n\n" +
"For a step-by-step introduction, check out:\n\n" +
" https://secrethub.io/docs/getting-started/\n\n" +
"To get help, see:\n\n" +
Expand Down
2 changes: 1 addition & 1 deletion internals/secrethub/credential_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

// Errors
var (
ErrCredentialNotExist = errMain.Code("credential_not_exist").Error("could not find credential file. Run `secrethub signup` to create an account.")
ErrCredentialNotExist = errMain.Code("credential_not_exist").Error("could not find credential file. Go to https://signup.secrethub.io/ to create an account or run `secrethub init` to use an already existing account on this machine.")
)

// CredentialConfig handles the configuration necessary for local credentials.
Expand Down
6 changes: 4 additions & 2 deletions internals/secrethub/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,18 @@ func (cmd *InitCommand) Run() error {
}
option, err := ui.Choose(cmd.io, "How do you want to initialize your SecretHub account on this device?",
[]string{
"Signup for a new account",
"Sign up for a new account",
"Use a backup code to recover an existing account",
}, 3)
if err != nil {
return err
}
fmt.Fprintln(cmd.io.Output())

switch option {
case 0:
mode = InitModeSignup
fmt.Fprintln(cmd.io.Output(), "Go to https://signup.secrethub.io/ and follow the steps to create an account and get it set up on this machine.")
return nil
case 1:
mode = InitModeBackupCode
}
Expand Down
2 changes: 1 addition & 1 deletion internals/secrethub/signup.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func NewSignUpCommand(io ui.IO, newClient newClientFunc, credentialStore Credent

// Register registers the command, arguments and flags on the provided Registerer.
func (cmd *SignUpCommand) Register(r command.Registerer) {
clause := r.Command("signup", "Create a free personal developer account.")
clause := r.Command("signup", "Create a free personal developer account.").Hidden()
clause.Flag("username", "The username you would like to use on SecretHub.").StringVar(&cmd.username)
clause.Flag("full-name", "Your full name.").StringVar(&cmd.fullName)
clause.Flag("email", "Your (work) email address we will use for all correspondence.").StringVar(&cmd.email)
Expand Down