Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions packages/core/auth-js/src/GoTrueAdminApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,19 +463,20 @@ export default class GoTrueAdminApi {
*
* This function should only be called on a server. Never expose your `service_role` key in the browser.
*/
private async _deleteOAuthClient(clientId: string): Promise<OAuthClientResponse> {
private async _deleteOAuthClient(
clientId: string
): Promise<{ data: null; error: AuthError | null }> {
try {
return await _request(
await _request(
this.fetch,
'DELETE',
`${this.url}/admin/oauth/clients/${clientId}`,
{
headers: this.headers,
xform: (client: any) => {
return { data: client, error: null }
},
noResolveJson: true,
}
)
return { data: null, error: null }
} catch (error) {
if (isAuthError(error)) {
return { data: null, error }
Expand Down
2 changes: 1 addition & 1 deletion packages/core/auth-js/src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1580,7 +1580,7 @@ export interface GoTrueAdminOAuthApi {
*
* This function should only be called on a server. Never expose your `service_role` key in the browser.
*/
deleteClient(clientId: string): Promise<OAuthClientResponse>
deleteClient(clientId: string): Promise<{ data: null; error: AuthError | null }>

/**
* Regenerates the secret for an OAuth client.
Expand Down