Skip to content

Commit 78646e5

Browse files
committed
fix(auth): updated api response structure
supabase/auth#2247
1 parent be3908f commit 78646e5

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

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

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3571,24 +3571,7 @@ export default class GoTrueClient {
35713571
return await _request(this.fetch, 'GET', `${this.url}/user/oauth/grants`, {
35723572
headers: this.headers,
35733573
jwt: session.access_token,
3574-
xform: (data: any) => {
3575-
// Transform flat API response to nested client structure
3576-
return {
3577-
data: {
3578-
grants: data.grants.map((grant: any) => ({
3579-
client: {
3580-
client_id: grant.client_id,
3581-
client_name: grant.client_name,
3582-
client_uri: grant.client_uri,
3583-
logo_uri: grant.logo_uri,
3584-
},
3585-
scopes: grant.scopes,
3586-
granted_at: grant.granted_at,
3587-
})),
3588-
},
3589-
error: null,
3590-
}
3591-
},
3574+
xform: (data: any) => ({ data, error: null }),
35923575
})
35933576
})
35943577
} catch (error) {

0 commit comments

Comments
 (0)