You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (str_contains($errorDescription, 'public') || str_contains($errorDescription, 'Cannot use client_credentials')) {
98
-
Log::error('Bitbucket OAuth consumer is marked as public. It must be marked as private.', [
99
-
'status' => $response->status(),
100
-
'error' => $errorBody['error'] ?? 'unknown',
101
-
'error_description' => $errorDescription,
102
-
'instructions' => 'Go to Bitbucket Workspace Settings > OAuth consumers > Edit your consumer > Check "This is a private consumer" > Save',
103
-
]);
104
-
105
-
thrownewException('Your Bitbucket OAuth consumer is marked as "public" but must be marked as "private consumer" to use client credentials grant. Please edit your OAuth consumer in Bitbucket settings and check the "This is a private consumer" option.');
106
-
}
107
-
108
-
// Check if the error is about missing callback URL
109
-
if (str_contains($errorDescription, 'callback') || str_contains($errorDescription, 'callback uri')) {
110
-
Log::error('Bitbucket OAuth consumer is missing callback URL', [
111
-
'status' => $response->status(),
112
-
'error' => $errorBody['error'] ?? 'unknown',
113
-
'error_description' => $errorDescription,
114
-
'instructions' => 'Go to Bitbucket Workspace Settings > OAuth consumers > Edit your consumer > Set a Callback URL (e.g., https://your-domain.com/callback) > Save',
115
-
]);
116
-
117
-
thrownewException('Your Bitbucket OAuth consumer is missing a callback URL. Please edit your OAuth consumer in Bitbucket settings and set a Callback URL (any valid URL will work, e.g., https://example.com/callback).');
0 commit comments