From 13ab0e829a7af2027071eb1a81cf2c4c48533ff4 Mon Sep 17 00:00:00 2001 From: kodster28 Date: Wed, 18 Nov 2026 09:51:08 -0600 Subject: [PATCH] docs(misc): add cross-links to auth and postgrest reference docs --- packages/core/auth-js/src/GoTrueAdminApi.ts | 16 ++++++------ packages/core/auth-js/src/GoTrueClient.ts | 26 +++++++++---------- .../src/PostgrestTransformBuilder.ts | 4 +-- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/packages/core/auth-js/src/GoTrueAdminApi.ts b/packages/core/auth-js/src/GoTrueAdminApi.ts index 1022c8f99ac..49b9ac00fcf 100644 --- a/packages/core/auth-js/src/GoTrueAdminApi.ts +++ b/packages/core/auth-js/src/GoTrueAdminApi.ts @@ -47,7 +47,7 @@ export default class GoTrueAdminApi { /** * Contains all OAuth client administration methods. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. */ oauth: GoTrueAdminOAuthApi @@ -647,7 +647,7 @@ export default class GoTrueAdminApi { * * @remarks * **Important:** This is a server-side operation and does **not** trigger client-side - * `onAuthStateChange` listeners. The admin API has no connection to client state. + * [`onAuthStateChange`](/docs/reference/javascript/auth-onauthstatechange) listeners. The admin API has no connection to client state. * * To sync changes to the client after calling this method: * 1. On the client, call `supabase.auth.refreshSession()` to fetch the updated user data @@ -926,7 +926,7 @@ export default class GoTrueAdminApi { /** * Lists all OAuth clients with optional pagination. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. * * This function should only be called on a server. Never expose your `service_role` key in the browser. */ @@ -967,7 +967,7 @@ export default class GoTrueAdminApi { /** * Creates a new OAuth client. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. * * This function should only be called on a server. Never expose your `service_role` key in the browser. */ @@ -991,7 +991,7 @@ export default class GoTrueAdminApi { /** * Gets details of a specific OAuth client. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. * * This function should only be called on a server. Never expose your `service_role` key in the browser. */ @@ -1014,7 +1014,7 @@ export default class GoTrueAdminApi { /** * Updates an existing OAuth client. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. * * This function should only be called on a server. Never expose your `service_role` key in the browser. */ @@ -1041,7 +1041,7 @@ export default class GoTrueAdminApi { /** * Deletes an OAuth client. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. * * This function should only be called on a server. Never expose your `service_role` key in the browser. */ @@ -1065,7 +1065,7 @@ export default class GoTrueAdminApi { /** * Regenerates the secret for an OAuth client. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. * * This function should only be called on a server. Never expose your `service_role` key in the browser. */ diff --git a/packages/core/auth-js/src/GoTrueClient.ts b/packages/core/auth-js/src/GoTrueClient.ts index eea8ef58e65..6872bdb87a6 100644 --- a/packages/core/auth-js/src/GoTrueClient.ts +++ b/packages/core/auth-js/src/GoTrueClient.ts @@ -255,7 +255,7 @@ export default class GoTrueClient { mfa: GoTrueMFAApi /** * Namespace for the OAuth 2.1 authorization server methods. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. * Used to implement the authorization code flow on the consent page. */ oauth: AuthOAuthServerApi @@ -613,7 +613,7 @@ export default class GoTrueClient { * * **Most callers do not need to invoke this directly.** The client calls it * automatically during construction, and to react to sign-in events (including - * post-redirect events) you should subscribe to `onAuthStateChange` rather + * post-redirect events) you should subscribe to [`onAuthStateChange`](/docs/reference/javascript/auth-onauthstatechange) rather * than awaiting `initialize()`. * * You only need to call it manually when you have opted out of the automatic @@ -860,7 +860,7 @@ export default class GoTrueClient { * * Be aware that if a user account exists in the system you may get back an * error message that attempts to hide this information from the user. - * This method has support for PKCE via email signups. The PKCE flow cannot be used when autoconfirm is enabled. + * This method has support for [PKCE](/docs/guides/auth/sessions/pkce-flow) via email signups. The PKCE flow cannot be used when autoconfirm is enabled. * * @returns A logged-in session if the server has "autoconfirm" ON * @returns A user if the server has "autoconfirm" OFF @@ -1295,7 +1295,7 @@ export default class GoTrueClient { /** * Log in an existing user via a third-party provider. - * This method supports the PKCE flow. + * This method supports the [PKCE flow](/docs/guides/auth/sessions/pkce-flow). * * @category Auth * @@ -1339,7 +1339,7 @@ export default class GoTrueClient { * @exampleDescription Sign in with scopes and access provider tokens * If you need additional access from an OAuth provider, in order to access provider specific APIs in the name of the user, you can do this by passing in the scopes the user should authorize for your application. Note that the `scopes` option takes in **a space-separated list** of scopes. * - * Because OAuth sign-in often includes redirects, you should register an `onAuthStateChange` callback immediately after you create the Supabase client. This callback will listen for the presence of `provider_token` and `provider_refresh_token` properties on the `session` object and store them in local storage. The client library will emit these values **only once** immediately after the user signs in. You can then access them by looking them up in local storage, or send them to your backend servers for further processing. + * Because OAuth sign-in often includes redirects, you should register an [`onAuthStateChange`](/docs/reference/javascript/auth-onauthstatechange) callback immediately after you create the Supabase client. This callback will listen for the presence of `provider_token` and `provider_refresh_token` properties on the `session` object and store them in local storage. The client library will emit these values **only once** immediately after the user signs in. You can then access them by looking them up in local storage, or send them to your backend servers for further processing. * * Finally, make sure you remove them from local storage on the `SIGNED_OUT` event. If the OAuth provider supports token revocation, make sure you call those APIs either from the frontend or schedule them to be called on the backend. * @@ -1383,7 +1383,7 @@ export default class GoTrueClient { } /** - * Log in an existing user by exchanging an Auth Code issued during the PKCE flow. + * Log in an existing user by exchanging an Auth Code issued during the [PKCE flow](/docs/guides/auth/sessions/pkce-flow). * * @category Auth * @@ -4461,7 +4461,7 @@ export default class GoTrueClient { } /** - * Sends a password reset request to an email address. This method supports the PKCE flow. + * Sends a password reset request to an email address. This method supports the [PKCE flow](/docs/guides/auth/sessions/pkce-flow). * * @param email The email address of the user. * @param options.redirectTo The URL to send the user to after they click the password reset link. @@ -4633,7 +4633,7 @@ export default class GoTrueClient { /** * Links an oauth identity to an existing user. - * This method supports the PKCE flow. + * This method supports the [PKCE flow](/docs/guides/auth/sessions/pkce-flow). */ async linkIdentity(credentials: SignInWithOAuthCredentials): Promise @@ -6422,7 +6422,7 @@ export default class GoTrueClient { /** * Retrieves details about an OAuth authorization request. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. * * Returns authorization details including client info, scopes, and user information. * If the response includes only a redirect_url field, it means consent was already given - the caller @@ -6468,7 +6468,7 @@ export default class GoTrueClient { /** * Approves an OAuth authorization request. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. */ private async _approveAuthorization( authorizationId: string, @@ -6521,7 +6521,7 @@ export default class GoTrueClient { /** * Denies an OAuth authorization request. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. */ private async _denyAuthorization( authorizationId: string, @@ -6574,7 +6574,7 @@ export default class GoTrueClient { /** * Lists all OAuth grants that the authenticated user has authorized. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. */ private async _listOAuthGrants(): Promise { try { @@ -6609,7 +6609,7 @@ export default class GoTrueClient { /** * Revokes a user's OAuth grant for a specific client. - * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth. + * Only relevant when the [OAuth 2.1 server](/docs/guides/auth/oauth-server) is enabled in Supabase Auth. */ private async _revokeOAuthGrant(options: { clientId: string diff --git a/packages/core/postgrest-js/src/PostgrestTransformBuilder.ts b/packages/core/postgrest-js/src/PostgrestTransformBuilder.ts index 394448dc5c7..dacd6feacb1 100644 --- a/packages/core/postgrest-js/src/PostgrestTransformBuilder.ts +++ b/packages/core/postgrest-js/src/PostgrestTransformBuilder.ts @@ -945,8 +945,8 @@ export default class PostgrestTransformBuilder< * * This affects only the single request it is chained to. The JS caller has no * handle on the transaction: supabase-js does not group multiple queries into - * one transaction. For multi-statement transactional logic, use a database - * function (`supabase.rpc(...)`). + * one transaction. For multi-statement transactional logic, use a + * [database function](/docs/guides/database/functions) (`supabase.rpc(...)`). * * Sets the `Prefer: tx=rollback` header. See PostgREST's docs on transaction * preferences for the underlying mechanism.