The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Remove the FAQs section for Auth Helpers
Andrew Smith50525b928f02
diff --git a/apps/docs/components/MDX/auth_helpers_faq.mdx b/apps/docs/components/MDX/auth_helpers_faq.mdxdeleted file mode 100644index 0f9a289d784..00000000000--- a/apps/docs/components/MDX/auth_helpers_faq.mdx+++ /dev/null@@ -1,31 +0,0 @@-### Fetch requests to API endpoints aren't showing the session--You must pass along the cookie header with the fetch request in order for your API endpoint to get access to the cookie from this request.--```ts-const res = await fetch('http://localhost/contact', {- headers: {- cookie: headers().get('cookie') as string,- },-})-```--### Performing administration tasks on the server side with the `service_role` `secret`--By default, the auth-helpers do not permit the use of the `service_role` `secret`. This restriction is in place to prevent the accidental exposure of your `service_role` `secret` to the public. Since the auth-helpers function on both the server and client side, it becomes challenging to separate the key specifically for client-side usage.--However, there is a solution. You can create a separate Supabase client using the `createClient` method from `@supabase/supabase-js` and provide it with the `service_role` `secret`. In a server environment, you will also need to disable certain properties to ensure proper functionality.--By implementing this approach, you can safely utilize the `service_role` `secret` without compromising security or exposing sensitive information to the public.--```ts-import { createClient } from '@supabase/supabase-js'--const supabase = createClient(supabaseUrl, serviceRoleSecret, {- auth: {- persistSession: false,- autoRefreshToken: false,- detectSessionInUrl: false,- },-})-```diff --git a/apps/docs/components/index.tsx b/apps/docs/components/index.tsxindex 2e999d38a66..5a50214c12e 100644--- a/apps/docs/components/index.tsx+++ b/apps/docs/components/index.tsx@@ -22,7 +22,6 @@ import QuickstartIntro from './MDX/quickstart_intro.mdx'import SocialProviderSettingsSupabase from './MDX/social_provider_settings_supabase.mdx'import SocialProviderSetup from './MDX/social_provider_setup.mdx'import StorageManagement from './MDX/storage_management.mdx'-import AuthHelpersFAQ from './MDX/auth_helpers_faq.mdx'import { CH } from '@code-hike/mdx/components'import RefHeaderSection from './reference/RefHeaderSection'@@ -75,7 +74,6 @@ const components = {SocialProviderSettingsSupabase,StepHikeCompact,StorageManagement,- AuthHelpersFAQ,Mermaid,Extensions,Alert: (props: any) => (diff --git a/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx b/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdxindex 4e08a013707..c66d2e48e4c 100644--- a/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx+++ b/apps/docs/pages/guides/auth/auth-helpers/nextjs.mdx@@ -854,24 +854,6 @@ See [refreshing session example](/docs/guides/auth/auth-helpers/nextjs#managing-- [Protected Routes](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs/app/[id]/page.tsx)- [Conditional Rendering in Client Components with SSR](https://github.com/supabase/supabase/tree/master/examples/auth/nextjs/app/login-form.tsx)-## Frequently asked questions--<AuthHelpersFAQ />--### OAuth sign in isn't redirecting on the server side--The reason behind this limitation is that the auth helpers library lacks a direct mechanism for performing server-side redirects, as each framework handles redirects differently. However, the library does offer a URL through the data property it returns, which should be utilized for the purpose of redirection.--```ts-import { NextResponse } from "next/server";-...-const { data } = await supabase.auth.signInWithOAuth({- provider: 'github',-})--return NextResponse.redirect(data.url)-```-## Migration Guide### Migrating to v0.7.Xdiff --git a/apps/docs/pages/guides/auth/auth-helpers/remix.mdx b/apps/docs/pages/guides/auth/auth-helpers/remix.mdxindex 1026ca5e0cc..e1769bca84d 100644--- a/apps/docs/pages/guides/auth/auth-helpers/remix.mdx+++ b/apps/docs/pages/guides/auth/auth-helpers/remix.mdx@@ -745,24 +745,6 @@ export default function Index() {> Ensure you have [enabled replication](https://supabase.com/dashboard/project/_/database/replication) on the table you are subscribing to.-## Frequently asked questions--<AuthHelpersFAQ />--### OAuth sign in isn't redirecting on the server side--The reason behind this limitation is that the auth helpers library lacks a direct mechanism for performing server-side redirects, as each framework handles redirects differently. However, the library does offer a URL through the data property it returns, which should be utilized for the purpose of redirection.--```ts-import { redirect } from "@remix-run/node"; // or cloudflare/deno-...-const { data } = await supabase.auth.signInWithOAuth({- provider: 'github',-})--return redirect(data.url)-```-## Migration Guide### Migrating to v0.2.0diff --git a/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx b/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdxindex a3582e0b8bc..10fdf26cd6e 100644--- a/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx+++ b/apps/docs/pages/guides/auth/auth-helpers/sveltekit.mdx@@ -749,24 +749,6 @@ export const actions = {}```-## Frequently asked questions--<AuthHelpersFAQ />--### OAuth sign in isn't redirecting on the server side--The reason behind this limitation is that the auth helpers library lacks a direct mechanism for performing server-side redirects, as each framework handles redirects differently. However, the library does offer a URL through the data property it returns, which should be utilized for the purpose of redirection.--```ts-import { redirect } from '@sveltejs/kit';-...-const { data } = await supabase.auth.signInWithOAuth({- provider: 'github',-})--throw redirect(303, data.url)-```-## Migration Guide [#migration]### Migrate to 0.10