示例#1
0
func promptUser() *Config {
	return &Config{
		ClientId:     util.Prompt("Enter Client Id: "),
		ClientSecret: util.Prompt("Enter Client Secret: "),
	}
}
示例#2
0
// Get auth code from user
func promptUserForAuthCode(config *oauth.Config) string {
	authUrl := config.AuthCodeURL("state")
	fmt.Println("Go to the following link in your browser:")
	fmt.Printf("%v\n\n", authUrl)
	return util.Prompt("Enter verification code: ")
}