# Bug NEX-638 - integration setup can be created with invalid boolean auth-method value

Project: Stream Nextcloud app "OpenProject Integration"
Status: closed
URL: https://community.openproject.org/work_packages/NEX-638

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | Nextcloud Integration 2.11.4 |
| Observed in versions |  |
| Bug found in version (deprecated) |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

Try to setup the integration via `/setup` endpoint.

Note: `"authorization_method": true,`

```bash
curl -XPOST 'https://nextcloud.local/index.php/apps/integration_openproject/setup' \
-H'Content-Type: application/json' \
-d'{
 "values":{
  "openproject_instance_url": "https://op-host",
  "authorization_method": true,
  "sso_provider_type": "nextcloud_hub",
  "targeted_audience_client_id": "client-id",  
  "setup_project_folder": false,
  "setup_app_password": false,
  "default_enable_navigation": false,
  "default_enable_unified_search": false
 }
}' \
-u admin:admin -vk
```

Response: 200❓

```text
< HTTP/2 200

{"status":false}
```

<br>

### Expected

```text
< HTTP/2 400

{
  "status":false,
  "error": "Invalid authorization method"
}
```
