code: def auth(**kwargs):
    ''' Authorize device synchronization. '''
  
    
  
    option = 'add'
    path = kwargs['path'] 
    key = kwargs['key']
  
    if kwargs['remove']:
      option = 'remove'
  
    if kwargs['yes']:
      output, err = cli_syncthing_adapter.auth(option, key, path)
      click.echo("%s" % output, err=err)
    else:
      verb = 'authorize' if not kwargs['remove'] else 'de-authorize'
      if click.confirm("Are you sure you want to %s this device to access %s?" % (verb, path)):
        output, err = cli_syncthing_adapter.auth(option, key, path)
  
        if output:
          click.echo("%s" % output, err=err)
docs: Authorize device synchronization.