Skip to content

Commit 8c13920

Browse files
committed
feat(auth): pass options object for future extensibility
1 parent 74e75ce commit 8c13920

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3587,7 +3587,7 @@ export default class GoTrueClient {
35873587
* Revokes a user's OAuth grant for a specific client.
35883588
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
35893589
*/
3590-
private async _revokeOAuthGrant(clientId: string): Promise<AuthOAuthRevokeGrantResponse> {
3590+
private async _revokeOAuthGrant(options: { clientId: string }): Promise<AuthOAuthRevokeGrantResponse> {
35913591
try {
35923592
return await this._useSession(async (result) => {
35933593
const {
@@ -3606,7 +3606,7 @@ export default class GoTrueClient {
36063606
return await _request(this.fetch, 'DELETE', `${this.url}/user/oauth/grants`, {
36073607
headers: this.headers,
36083608
jwt: session.access_token,
3609-
query: { client_id: clientId },
3609+
query: { client_id: options.clientId },
36103610
xform: () => ({ data: {}, error: null }),
36113611
})
36123612
})

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,8 +1772,9 @@ export interface AuthOAuthServerApi {
17721772
* Revocation marks consent as revoked, deletes active sessions for that OAuth client,
17731773
* and invalidates associated refresh tokens.
17741774
*
1775-
* @param clientId - The OAuth client identifier (UUID) to revoke access for
1775+
* @param options - Revocation options
1776+
* @param options.clientId - The OAuth client identifier (UUID) to revoke access for
17761777
* @returns Empty response on successful revocation
17771778
*/
1778-
revokeGrant(clientId: string): Promise<AuthOAuthRevokeGrantResponse>
1779+
revokeGrant(options: { clientId: string }): Promise<AuthOAuthRevokeGrantResponse>
17791780
}

0 commit comments

Comments
 (0)