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>;
}

§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