2626 faClient * fusionauth.FusionAuthClient
2727)
2828
29- // LoginCmd provides the subcommand for logging into the FA server using the Device Flow.
29+ // LoginCmd provides the command for logging into the FA server using the Device Flow.
3030var LoginCmd = & cobra.Command {
3131 Use : "login" ,
3232 Short : "Authenticate to the FA server using the OAuth Device Flow." ,
@@ -57,7 +57,7 @@ func startDeviceGrantFlow(deviceAuthEndpoint string) (*fusionauth.DeviceResponse
5757 var result * fusionauth.DeviceResponse = & fusionauth.DeviceResponse {}
5858
5959 resp , err := http .PostForm (deviceAuthEndpoint , url.Values {
60- "client_id" : {"7dde5f47-5000-4580-8003-b3b8d1cbe2e9" },
60+ "client_id" : {ClientID },
6161 "scope" : {"offline_access" },
6262 "metaData.device.name" : {"Golang CLI App" },
6363 "metaData.device.type" : {string (fusionauth .DeviceType_OTHER )},
@@ -77,10 +77,10 @@ func informUserAndOpenBrowser(userCode string) {
7777 cyan := color .New (color .FgCyan )
7878 cyan .Printf ("Your User Code is: " )
7979
80- red := color .New (color .FgRed , color .Bold )
81- red .Printf ("%s\n " , userCode )
80+ yellow := color .New (color .FgYellow , color .Bold )
81+ yellow .Printf ("%s\n " , userCode )
8282
83- fmt .Printf ("Opening browser for code entry...\n " )
83+ cyan .Printf ("Opening browser for code entry...\n " )
8484
8585 // Wait a few seconds to give user a chance to check out the printed user code.
8686 time .Sleep (3 * time .Second )
@@ -139,6 +139,6 @@ func fetchAndSaveUser(token *fusionauth.AccessToken) {
139139 // Save our User object for later usage in fetch
140140 Save ("/tmp/getgif.json" , resp .User )
141141
142- mag := color .New (color .FgMagenta )
143- mag .Printf ("You successfully authenticated! You can now use `getgif fetch`!\n " )
142+ cyan := color .New (color .FgCyan )
143+ cyan .Printf ("You successfully authenticated! You can now use `getgif fetch`!\n " )
144144}
0 commit comments