Repository: rclone/rclone
File: backend/box/box.go (Go)

Code before:
			var err error
			// If using box config.json, use JWT auth
			if usesJWTAuth(m) {
				err = refreshJWTToken(ctx, name, m)
				if err != nil {
					return nil, fmt.Errorf("failed to configure token with jwt authentication: %w", err)
				}
				// Else, if not using an access token, use oauth2
			} else if boxAccessToken == "" || !boxAccessTokenOk {
				return oauthutil.ConfigOut("", &oauthutil.Options{
					OAuth2Config: oauthConfig,
				})
			}
			return nil, nil
		},
		Options: append(oauthutil.SharedOptions, []fs.Option{{
			Name:      "root_folder_id",
			Help:      "Fill in for rclone to use a non root folder as its starting point.",
			Default:   "0",
			Advanced:  true,
			Sensitive: true,
		}, {
			Name: "box_config_file",
			Help: "Box App config.json location\n\nLeave blank normally." + env.ShellExpandHelp,
		}, {
			Name:      "box_config_credentials",
			Help:      "Box App config.json contents.\n\nLeave blank normally.",
			Hide:      fs.OptionHideBoth,
			Sensitive: true,
		}, {
			Name:      "access_token",
			Help:      "Box App Primary Access Token\n\nLeave blank normally.",
			Sensitive: true,
		}, {
			Name:    "box_sub_type",
			Default: "user",
			Examples: []fs.OptionExample{{
				Value: "user",
				Help:  "Rclone should act on behalf of a user.",
			}, {
				Value: "enterprise",
				Help:  "Rclone should act on behalf of a service account.",
			}},
		}, {
			Name:     "upload_cutoff",
			Help:     "Cutoff for switching to multipart upload (>= 50 MiB).",
			Default:  fs.SizeSuffix(defaultUploadCutoff),
			Advanced: true,
		}, {
			Name:     "commit_retries",
			Help:     "Max number of times to try committing a multipart file.",

Review comment (security):
This will make the flag box-box-config-credentials, we added the other box ones e.g. box_config_file by mistake and we are trying to avoid that again! Please could you adjust it to just be "config_credentials" thanks! Otherwise I think it is ready to merge.

Code after:
			boxAccessToken, boxAccessTokenOk := m.Get("access_token")
			var err error
			// If using box config.json, use JWT auth
			if usesJWTAuth(m) {
				err = refreshJWTToken(ctx, name, m)
				if err != nil {
					return nil, fmt.Errorf("failed to configure token with jwt authentication: %w", err)
				}
				// Else, if not using an access token, use oauth2
			} else if boxAccessToken == "" || !boxAccessTokenOk {
				return oauthutil.ConfigOut("", &oauthutil.Options{
					OAuth2Config: oauthConfig,
				})
			}
			return nil, nil
		},
		Options: append(oauthutil.SharedOptions, []fs.Option{{
			Name:      "root_folder_id",
			Help:      "Fill in for rclone to use a non root folder as its starting point.",
			Default:   "0",
			Advanced:  true,
			Sensitive: true,
		}, {
			Name: "box_config_file",
			Help: "Box App config.json location\n\nLeave blank normally." + env.ShellExpandHelp,
		}, {
			Name:      "config_credentials",
			Help:      "Box App config.json contents.\n\nLeave blank normally.",
			Hide:      fs.OptionHideBoth,
			Sensitive: true,
		}, {
			Name:      "access_token",
			Help:      "Box App Primary Access Token\n\nLeave blank normally.",
			Sensitive: true,
		}, {
			Name:    "box_sub_type",
			Default: "user",
			Examples: []fs.OptionExample{{
				Value: "user",
				Help:  "Rclone should act on behalf of a user.",
			}, {
				Value: "enterprise",
				Help:  "Rclone should act on behalf of a service account.",
			}},
		}, {
			Name:     "upload_cutoff",
			Help:     "Cutoff for switching to multipart upload (>= 50 MiB).",
			Default:  fs.SizeSuffix(defaultUploadCutoff),
			Advanced: true,
		}, {
			Name:     "commit_retries",