# Bug SI-80 - Token Refresh and Exchange does not work when Client ID contains special characters

Project: Stream Integration Basics
Status: closed
URL: https://community.openproject.org/work_packages/SI-80

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 16.0.0 |
| Observed in versions | 15.4.0 |
| Bug found in version (deprecated) | 15.4.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable | Jan Sandbrink |
| 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.  Configure OIDC Provider where the client ID is a URL (e.g. https://openproject.local)
    
2.  See that logging users in through that provider works
    
3.  Try to exchange a token for them (e.g. through a Rails console using `OpenIDConnect::UserTokens::FetchService` or using SSO authentication at a storage)
    

### What is the buggy behavior?

Token Exchange does not work because of `invalid_client`

### What is the expected behavior?

Token Exchange and Refresh should work as usual.
