Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

AuthOAuthServerApi

Contains all OAuth 2.1 authorization server user-facing methods. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.

These methods are used to implement the consent page.

interface AuthOAuthServerApi {
approveAuthorization(authorizationId: string, options?: {
skipBrowserRedirect?: boolean;
}
): Promise<AuthOAuthConsentResponse>;
denyAuthorization(authorizationId: string, options?: {
skipBrowserRedirect?: boolean;
}
): Promise<AuthOAuthConsentResponse>;
getAuthorizationDetails(authorizationId: string): Promise<AuthOAuthAuthorizationDetailsResponse>;
listGrants(): Promise<AuthOAuthGrantsResponse>;
revokeGrant(options: {
clientId: string;
}
): Promise<AuthOAuthRevokeGrantResponse>;
}

§Methods

§
approveAuthorization(authorizationId: string, options?: {
skipBrowserRedirect?: boolean;
}
): Promise<AuthOAuthConsentResponse>
[src]

Approves an OAuth authorization request. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.

@param authorizationId
  • The authorization ID to approve
@param options
  • Optional parameters including skipBrowserRedirect
@return

Redirect URL to send the user back to the OAuth client

§
denyAuthorization(authorizationId: string, options?: {
skipBrowserRedirect?: boolean;
}
): Promise<AuthOAuthConsentResponse>
[src]

Denies an OAuth authorization request. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.

@param authorizationId
  • The authorization ID to deny
@param options
  • Optional parameters including skipBrowserRedirect
@return

Redirect URL to send the user back to the OAuth client

§
getAuthorizationDetails(authorizationId: string): Promise<AuthOAuthAuthorizationDetailsResponse>
[src]

Retrieves details about an OAuth authorization request. Used to display consent information to the user. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.

This method returns authorization details including client info, scopes, and user information. If the response includes a redirect_uri, it means consent was already given - the caller should handle the redirect manually if needed.

@param authorizationId
  • The authorization ID from the authorization request
@return

Authorization details including client info and requested scopes

§
listGrants(): Promise<AuthOAuthGrantsResponse>
[src]

Lists all OAuth grants that the authenticated user has authorized. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.

@return

Response with array of OAuth grants with client information and granted scopes

§
revokeGrant(options: {
clientId: string;
}
): Promise<AuthOAuthRevokeGrantResponse>
[src]

Revokes a user's OAuth grant for a specific client. Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.

Revocation marks consent as revoked, deletes active sessions for that OAuth client, and invalidates associated refresh tokens.

@param options
  • Revocation options
@param options.clientId
  • The OAuth client identifier (UUID) to revoke access for
@return

Empty response on successful revocation