# boolean_smtp_oauth_debug_ui

> Filters whether the admin UI shows raw OAuth provider diagnostics.

Filter · Tier C · Since 1.0.0

Off by default: raw OAuth provider error bodies can be large and are not meant for end users. Return true to opt in. This filter also gates the raw diagnostic data returned by the REST API; see
{@see \BooleanSmtp\Http\Controllers\ConnectionController::refreshOAuthNow()} and {@see \BooleanSmtp\Http\Controllers\ConnectionController::getOAuthRefreshHistory()}.

## Signature

```php
add_filter( 'boolean_smtp_oauth_debug_ui', $callback, 10, 1 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$enabled` | `bool` | Whether to show raw OAuth diagnostics. Default false. |

**Returns** `bool` — The filtered value.

## Fires in

- [app/Http/Controllers/ConnectionController.php:1772](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Http/Controllers/ConnectionController.php#L1772) — `BooleanSmtp\Http\Controllers\ConnectionController::refreshOAuthNow()`
- [app/Http/Controllers/ConnectionController.php:1881](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Http/Controllers/ConnectionController.php#L1881) — `BooleanSmtp\Http\Controllers\ConnectionController::getOAuthRefreshHistory()`
- [app/Providers/AppServiceProvider.php:958](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Providers/AppServiceProvider.php#L958) — `BooleanSmtp\Providers\AppServiceProvider::adminSpaBootstrapProps()`

## Example

```php
add_filter( 'boolean_smtp_oauth_debug_ui', function ( bool $enabled ) {
    return $enabled;
}, 10, 1 );
```
