Skip to content

Commit aa5a031

Browse files
committed
fix(auth): handle 204 No Content response in OAuth client delete
1 parent c5ad2f4 commit aa5a031

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/core/auth-js/src/GoTrueAdminApi.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,17 +465,16 @@ export default class GoTrueAdminApi {
465465
*/
466466
private async _deleteOAuthClient(clientId: string): Promise<OAuthClientResponse> {
467467
try {
468-
return await _request(
468+
await _request(
469469
this.fetch,
470470
'DELETE',
471471
`${this.url}/admin/oauth/clients/${clientId}`,
472472
{
473473
headers: this.headers,
474-
xform: (client: any) => {
475-
return { data: client, error: null }
476-
},
474+
noResolveJson: true,
477475
}
478476
)
477+
return { data: {}, error: null }
479478
} catch (error) {
480479
if (isAuthError(error)) {
481480
return { data: null, error }

0 commit comments

Comments
 (0)