vendor/github.com/McKael/madon/v3/login.go
changeset 270 df7e9dff1b66
parent 268 4dd196a4ee7c
equal deleted inserted replaced
269:c50e88700432 270:df7e9dff1b66
   112 	}
   112 	}
   113 
   113 
   114 	if code == "" {
   114 	if code == "" {
   115 		// URL to consent page to ask for permission
   115 		// URL to consent page to ask for permission
   116 		// for the scopes specified above.
   116 		// for the scopes specified above.
   117 		return conf.AuthCodeURL("state", oauth2.AccessTypeOffline), nil
   117 		url := conf.AuthCodeURL("state", oauth2.AccessTypeOffline) + "&client_name=madonctl&redirect_uris=urn:ietf:wg:oauth:2.0:oob"
       
   118 		return url, nil
   118 	}
   119 	}
   119 
   120 
   120 	// Return token
   121 	// Return token
   121 	t, err := conf.Exchange(context.TODO(), code)
   122 	t, err := conf.Exchange(context.TODO(), code)
   122 	if err != nil {
   123 	if err != nil {