Skip to content

Commit 68d3b2c

Browse files
authored
fix(auth): oauth minor fixes on types (#1891)
1 parent 2ab882b commit 68d3b2c

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3628,12 +3628,13 @@ export default class GoTrueClient {
36283628
return this._returnResult({ data: null, error: new AuthSessionMissingError() })
36293629
}
36303630

3631-
return await _request(this.fetch, 'DELETE', `${this.url}/user/oauth/grants`, {
3631+
await _request(this.fetch, 'DELETE', `${this.url}/user/oauth/grants`, {
36323632
headers: this.headers,
36333633
jwt: session.access_token,
36343634
query: { client_id: options.clientId },
3635-
xform: () => ({ data: {}, error: null }),
3635+
noResolveJson: true,
36363636
})
3637+
return { data: {}, error: null }
36373638
})
36383639
} catch (error) {
36393640
if (isAuthError(error)) {

packages/core/auth-js/src/lib/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,8 +1691,8 @@ export type OAuthAuthorizationClient = {
16911691
export type OAuthAuthorizationDetails = {
16921692
/** The authorization ID */
16931693
authorization_id: string
1694-
/** Redirect URI - present if user already consented (can be used to trigger immediate redirect) */
1695-
redirect_uri?: string
1694+
/** Redirect URL - present if user already consented (can be used to trigger immediate redirect) */
1695+
redirect_url?: string
16961696
/** OAuth client requesting authorization */
16971697
client: OAuthAuthorizationClient
16981698
/** User object associated with the authorization */

0 commit comments

Comments
 (0)