# Bug OP-15877 - www-authenticate header lacks comma

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

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 14.6.0 |
| Observed in versions | 14.4.0 |
| Sprint | 14.6.0 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 14.4.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 | Eric Schubert |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

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

## Costs

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

## Description

### Steps to reproduce

1.  Fetch an access token using the token API
    
2.  Wait till the token is expired
    
3.  Call the /api/v3/users/me endpoint
    

### What is the buggy behavior?

The API responds with the header

_Www-Authenticate: Bearer realm=&quot;OpenProject API&quot; error=&quot;invalid\_token&quot;_

Which is in a wrong format and causes consumers like the Flutter SDK to fail parsing the response.

### What is the expected behavior?

According to [https://datatracker.ietf.org/doc/html/rfc7235#section-4.1](https://datatracker.ietf.org/doc/html/rfc7235#section-4.1) the www-authenticate header needs to be comma separated. We tested and returning the following header fixes the issue:

_Www-Authenticate: Bearer realm=&quot;OpenProject API&quot;, error=&quot;invalid\_token&quot;_

### Environment information

_Please check and fill out the following details to help us identify in what versions and distributions of OpenProject the error occurs_

**OpenProject installation type**

*   [ ] Hosted cloud edition
*   [ ] Packaged installation
    *   What distribution?
        
*   [x] Docker All-in-one container
*   [x] Docker-compose installation
*   [ ] Other (please specify)

**OpenProject version**

The issue occurs starting from 14.4
