Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Docs: Fix TypeScript Error on "Email Auth with PKCE flow for SSR" page (#22204)

Kellen Mace38939fbc795e
diff --git a/apps/docs/content/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr.mdx b/apps/docs/content/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr.mdx
index 24a69be3362..7144fd01095 100644
--- a/apps/docs/content/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr.mdx
+++ b/apps/docs/content/guides/auth/server-side/email-based-auth-with-pkce-flow-for-ssr.mdx
@@ -79,6 +79,7 @@ Create a new file at `src/routes/auth/confirm/+server.ts` and populate with the
```ts src/routes/auth/confirm/+server.ts
import { redirect } from '@sveltejs/kit'
+import { type EmailOtpType } from '@supabase/supabase-js'
export const GET = async (event) => {
const {
@@ -86,7 +87,7 @@ export const GET = async (event) => {
locals: { supabase },
} = event
const token_hash = url.searchParams.get('token_hash') as string
- const type = url.searchParams.get('type') as string
+ const type = url.searchParams.get('type') as EmailOtpType | null
const next = url.searchParams.get('next') ?? '/'
if (token_hash && type) {