# Bug OP-17510 - Server error when cancelling OAuth flow

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-17510

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module | Authentication / OAuth |
| Target versions | 16.3.0 |
| Observed in versions | 16.1.0 |
| Sprint | 16.3.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 16.1.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

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

## Planning

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

## Costs

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

## Description

###   

### Steps to reproduce

1.  Go to an OpenProject OAuth application consent screen
    
    1.  e.g. by connecting from Nextcloud to OpenProject in the two-way OAuth 2.0 flow
        
2.  On the consent screen, click &quot;Cancel and deny auth&quot;
    

### What is the buggy behavior?

An internal server error occurs

Technical hint:

```text
Authorization check required for Doorkeeper::AuthorizationsController#destroy.

Use any method of
require_admin, authorize, authorize_global, load_and_authorize_in_optional_project
to ensure authorization. If authorization is checked by any other means,
affirm the same by calling 'authorization_checked!' in the controller. If the authorization does
not need to be checked for this action, affirm the same by calling 'no_authorization_required!'
```

### What is the expected behavior?

No server error, just a cancelled authorization.

###   

### Screenshots and other files

<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/732236/content">
