jottacloud: remove clientSecret from config when upgrading to token based authentication - #4645
This commit is contained in:
parent
75a7226174
commit
664213cedb
1 changed files with 3 additions and 1 deletions
|
@ -373,6 +373,9 @@ func v2config(ctx context.Context, name string, m configmap.Mapper) {
|
||||||
fmt.Printf("Login Token> ")
|
fmt.Printf("Login Token> ")
|
||||||
loginToken := config.ReadLine()
|
loginToken := config.ReadLine()
|
||||||
|
|
||||||
|
m.Set(configClientID, "jottacli")
|
||||||
|
m.Set(configClientSecret, "")
|
||||||
|
|
||||||
token, err := doAuthV2(ctx, srv, loginToken, m)
|
token, err := doAuthV2(ctx, srv, loginToken, m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to get oauth token: %s", err)
|
log.Fatalf("Failed to get oauth token: %s", err)
|
||||||
|
@ -384,7 +387,6 @@ func v2config(ctx context.Context, name string, m configmap.Mapper) {
|
||||||
|
|
||||||
fmt.Printf("\nDo you want to use a non standard device/mountpoint e.g. for accessing files uploaded using the official Jottacloud client?\n\n")
|
fmt.Printf("\nDo you want to use a non standard device/mountpoint e.g. for accessing files uploaded using the official Jottacloud client?\n\n")
|
||||||
if config.Confirm(false) {
|
if config.Confirm(false) {
|
||||||
oauthConfig.ClientID = "jottacli"
|
|
||||||
oAuthClient, _, err := oauthutil.NewClient(name, m, oauthConfig)
|
oAuthClient, _, err := oauthutil.NewClient(name, m, oauthConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("Failed to load oAuthClient: %s", err)
|
log.Fatalf("Failed to load oAuthClient: %s", err)
|
||||||
|
|
Loading…
Reference in a new issue