Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"react-dom": "catalog:",
"sharp": "~0.34.0",
"tailwind-merge": "^1.13.2",
"tsx": "^4.19.3",
"tsx": "catalog:",
"typescript": "catalog:"
},
"externals": {
Expand Down
2 changes: 1 addition & 1 deletion apps/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"shiki": "^1.1.7",
"tailwindcss": "catalog:",
"tsconfig": "workspace:*",
"tsx": "^4.19.3",
"tsx": "catalog:",
"typescript": "catalog:",
"unist-builder": "3.0.0"
}
Expand Down
6 changes: 6 additions & 0 deletions apps/docs/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,12 @@ const additionalResources = [
href: 'https://supabase.com/ui',
external: true,
},
{
title: 'Troubleshooting',
description: 'Our troubleshooting guide for solutions to common Supabase issues.',
icon: 'troubleshooting',
href: '/guides/troubleshooting',
},
]

const HomePage = () => (
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/guides/auth/general-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This section covers the [general configuration options](/dashboard/project/_/aut
- [Email Templates](/dashboard/project/_/auth/templates) to configure what emails your users receive.
- [Custom SMTP](/dashboard/project/_/auth/smtp) to configure how emails are sent.
- [Multi-Factor](/dashboard/project/_/auth/mfa) to require users to provide additional verification factors to authenticate.
- [URL Configuration](/dashboard/project/_/auth/url-configuration) to configure site URL and redirect URLs for authentication.
- [URL Configuration](/dashboard/project/_/auth/url-configuration) to configure site URL and redirect URLs for authentication. Read more [in the redirect URLs documentation](/docs/guides/auth/redirect-urls).
- [Attack Protection](/dashboard/project/_/auth/protection) to configure security settings to protect your project from attacks.
- [Auth Hooks (BETA)](/dashboard/project/_/auth/auth-hooks) to use Postgres functions or HTTP endpoints to customize the behavior of Supabase Auth to meet your needs.
- [Audit Logs (BETA)](/dashboard/project/_/auth/audit-logs) to track and monitor auth events in your project.
Expand Down
12 changes: 8 additions & 4 deletions apps/docs/content/guides/auth/redirect-urls.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ subtitle: 'Set up redirect urls with Supabase Auth.'

## Overview

Supabase Auth allows your application to receive a [user session](/docs/guides/auth/sessions) on web pages or in mobile apps that only you allow.
Supabase Auth allows you to control how the [user sessions](/docs/guides/auth/sessions) are handled by your application.

When using [passwordless sign-ins](/docs/reference/javascript/auth-signinwithotp) or [third-party providers](/docs/reference/javascript/auth-signinwithoauth#sign-in-using-a-third-party-provider-with-redirect), the Supabase client library methods provide a `redirectTo` parameter to specify where to redirect the user to after authentication. By default, the user will be redirected to the [`SITE_URL`](/docs/guides/auth/redirect-urls) but you can modify the `SITE_URL` or add additional redirect URLs to the allow list. Once you've added necessary URLs to the allow list, you can specify the URL you want the user to be redirected to in the `redirectTo` parameter.
When using [passwordless sign-ins](/docs/reference/javascript/auth-signinwithotp) or [third-party providers](/docs/reference/javascript/auth-signinwithoauth#sign-in-using-a-third-party-provider-with-redirect), the Supabase client library provides a `redirectTo` parameter to specify where to redirect the user after authentication. The URL in `redirectTo` should match the [Redirect URLs](/dashboard/project/_/auth/url-configuration) list configuration.

When using [Sign in with Web3](/docs/guides/auth/auth-web3) the message signed by the user in the Web3 wallet application will indicate the URL on which the signature took place. Supabase Auth will reject messages that are signed for URLs that have not been allowed.
To configure allowed redirect URLs, go to the [URL Configuration](/dashboard/project/_/auth/url-configuration) page. Once you've added necessary URLs, you can use the URL you want the user to be redirected to in the `redirectTo` parameter.

To edit the allow list, go to the [URL Configuration](/dashboard/project/_/auth/url-configuration) page. In local development or self-hosted projects, use the [configuration file](/docs/guides/cli/config#auth.additional_redirect_urls).
The Site URL in [URL Configuration](/dashboard/project/_/auth/url-configuration) defines the **default redirect URL** when no `redirectTo` is specified in the code. Change this from `http://localhost:3000` to your production URL (e.g., https://example.com). This setting is critical for email confirmations and password resets.

When using [Sign in with Web3](/docs/guides/auth/auth-web3), the message signed by the user in the Web3 wallet application will indicate the URL on which the signature took place. Supabase Auth will reject messages that are signed for URLs that are not on the allowed list.

In local development or self-hosted projects, use the [configuration file](/docs/guides/local-development/cli/config#auth.additional_redirect_urls). See below for more information on configuring `SITE_URL` when deploying to Vercel or Netlify.

## Use wildcards in redirect URLs

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ In order for the provided `redirectTo` option to work you must set the exact URL

![image](/docs/img/troubleshooting/224379580-fa77bd31-bb58-47e6-90ce-64e140f32579.png)

For more information on formats for redirect URL settings see the documentation here: https://supabase.com/docs/guides/auth/overview#redirect-urls-and-wildcards
For more information on formats for redirect URL settings see the documentation here: https://supabase.com/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls
6 changes: 3 additions & 3 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
"unist-util-visit": "^4.1.2",
"uuid": "^9.0.1",
"valtio": "catalog:",
"yaml": "^2.4.5",
"yaml": "^2.8.1",
"zod": "catalog:"
},
"devDependencies": {
Expand Down Expand Up @@ -159,12 +159,12 @@
"slugify": "^1.6.6",
"smol-toml": "^1.3.1",
"tsconfig": "workspace:*",
"tsx": "^4.19.3",
"tsx": "catalog:",
"twoslash": "^0.3.1",
"typescript": "catalog:",
"unist-util-visit-parents": "5.1.3",
"vite": "catalog:",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^3.0.5"
"vitest": "catalog:"
}
}
26 changes: 13 additions & 13 deletions apps/studio/components/interfaces/Database/Hooks/FormContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,23 @@ export const FormContents = ({
if (values.http_url && isEdgeFunctionSelected) {
const fnSlug = values.http_url.split('/').at(-1)
const fn = functions.find((x) => x.slug === fnSlug)
const authorizationHeader = httpHeaders.find((x) => x.name === 'Authorization')
const edgeFunctionAuthHeaderVal = `Bearer ${legacyServiceRole}`

if (fn?.verify_jwt) {
if (!httpHeaders.some((x) => x.name === 'Authorization')) {
const authorizationHeader = {
id: uuidv4(),
name: 'Authorization',
value: `Bearer ${legacyServiceRole}`,
}
setHttpHeaders([...httpHeaders, authorizationHeader])
if (fn?.verify_jwt && authorizationHeader == null) {
const authorizationHeader = {
id: uuidv4(),
name: 'Authorization',
value: edgeFunctionAuthHeaderVal,
}
} else {
const updatedHttpHeaders = httpHeaders.filter((x) => x.name !== 'Authorization')
setHttpHeaders([...httpHeaders, authorizationHeader])
} else if (fn?.verify_jwt && authorizationHeader?.value !== edgeFunctionAuthHeaderVal) {
const updatedHttpHeaders = httpHeaders.map((x) => {
if (x.name === 'Authorization') return { ...x, value: edgeFunctionAuthHeaderVal }
else return x
})
setHttpHeaders(updatedHttpHeaders)
}
} else {
const updatedHttpHeaders = httpHeaders.filter((x) => x.name !== 'Authorization')
setHttpHeaders(updatedHttpHeaders)
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [values.http_url, isSuccessEdgeFunctions])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export const SUPABASE_ROLES = [
'pgsodium_keyiduser',
'pgsodium_keymaker',
'pgtle_admin',
'cli_login_postgres',
'supabase_etl_admin',
] as const

// [Joshen] This was originally in the Roles mobx store
Expand Down
36 changes: 18 additions & 18 deletions apps/studio/components/interfaces/UnifiedLogs/UnifiedLogs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,7 @@ export const UnifiedLogs = () => {
chartConfig={filteredChartConfig}
/>
</DataTableHeaderLayout>

<Separator />

<ResizablePanelGroup direction="horizontal" className="w-full h-full">
<ResizablePanel
defaultSize={selectedRowKey ? 60 : 100}
Expand All @@ -388,22 +386,24 @@ export const UnifiedLogs = () => {
isFetchingButNotPaginating && 'opacity-60 transition-opacity duration-150'
)}
>
<DataTableInfinite
columns={UNIFIED_LOGS_COLUMNS}
totalRows={totalDBRowCount}
filterRows={filterDBRowCount}
totalRowsFetched={totalFetched}
fetchNextPage={fetchNextPage}
hasNextPage={hasNextPage}
renderLiveRow={(props) => {
if (!liveMode.timestamp) return null
if (props?.row?.original.id !== liveMode?.row?.id) return null
return <LiveRow colSpan={UNIFIED_LOGS_COLUMNS.length - 1} />
}}
setColumnOrder={setColumnOrder}
setColumnVisibility={setColumnVisibility}
searchParamsParser={SEARCH_PARAMS_PARSER}
/>
<div className="h-full overflow-auto">
<DataTableInfinite
columns={UNIFIED_LOGS_COLUMNS}
totalRows={totalDBRowCount}
filterRows={filterDBRowCount}
totalRowsFetched={totalFetched}
fetchNextPage={fetchNextPage}
hasNextPage={hasNextPage}
renderLiveRow={(props) => {
if (!liveMode.timestamp) return null
if (props?.row?.original.id !== liveMode?.row?.id) return null
return <LiveRow colSpan={UNIFIED_LOGS_COLUMNS.length - 1} />
}}
setColumnOrder={setColumnOrder}
setColumnVisibility={setColumnVisibility}
searchParamsParser={SEARCH_PARAMS_PARSER}
/>
</div>
</ResizablePanel>
<LogsListPanel selectedRow={selectedRow} />
</ResizablePanelGroup>
Expand Down
14 changes: 10 additions & 4 deletions apps/studio/components/layouts/Tabs/NewTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function NewTab() {

/**
* Returns:
* - `QuickstartVariant`: user variation (`ai`, `templates`, `assistant`)
* - `QuickstartVariant`: user variation (`control`, `ai`, `templates`, `assistant`)
* - `false`: user not yet bucketed or not targeted for experiment
* - `undefined`: PostHog still loading
*/
Expand All @@ -102,14 +102,20 @@ export function NewTab() {
? tableQuickstartVariant
: null

const shouldTrackExposure =
editor !== 'sql' &&
isNewProject &&
tableQuickstartVariant !== false &&
tableQuickstartVariant !== undefined

useEffect(() => {
if (activeQuickstartVariant && !hasTrackedExposure.current) {
if (shouldTrackExposure && !hasTrackedExposure.current) {
hasTrackedExposure.current = true
track('table_quickstart_opened', {
variant: activeQuickstartVariant,
variant: tableQuickstartVariant,
})
}
}, [activeQuickstartVariant, track])
}, [shouldTrackExposure, tableQuickstartVariant, track])

const handleOpenAssistant = () => {
if (isCreatingChat) return
Expand Down
8 changes: 4 additions & 4 deletions apps/studio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@
"@types/sqlstring": "^2.3.0",
"@types/uuid": "^8.3.4",
"@types/zxcvbn": "^4.4.1",
"@vitest/coverage-v8": "^3.0.9",
"@vitest/ui": "^3.0.0",
"@vitest/coverage-v8": "^3.2.0",
"@vitest/ui": "^3.2.0",
"api-types": "workspace:*",
"common": "workspace:*",
"config": "workspace:*",
Expand All @@ -201,10 +201,10 @@
"raw-loader": "^4.0.2",
"require-in-the-middle": "^7.5.2",
"tailwindcss": "catalog:",
"tsx": "^4.19.3",
"tsx": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^3.0.5"
"vitest": "catalog:"
}
}
2 changes: 1 addition & 1 deletion apps/ui-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
"shiki": "^1.1.7",
"tailwindcss": "catalog:",
"tsconfig": "workspace:*",
"tsx": "^4.19.3",
"tsx": "catalog:",
"typescript": "catalog:",
"vite": "catalog:"
}
Expand Down
4 changes: 2 additions & 2 deletions apps/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"react-countdown": "^2.3.5",
"react-dom": "catalog:",
"react-markdown": "^8.0.3",
"react-syntax-highlighter": "^15.5.0",
"react-syntax-highlighter": "^15.6.6",
"react-transition-group": "^4.4.1",
"react-use": "^17.4.0",
"recharts": "^2.8.0",
Expand Down Expand Up @@ -99,7 +99,7 @@
"@types/react": "catalog:",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "catalog:",
"@types/react-syntax-highlighter": "^15.5.6",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/three": "^0.169.0",
"@types/uuid": "^9.0.8",
"api-types": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/ai-commands/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"tsconfig": "workspace:*",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "^3.0.5"
"vitest": "catalog:"
}
}
6 changes: 3 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"@types/node": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@vitest/coverage-v8": "^3.0.9",
"@vitest/ui": "^3.0.0",
"@vitest/coverage-v8": "^3.2.0",
"@vitest/ui": "^3.2.0",
"tsconfig": "workspace:*",
"typescript": "catalog:",
"vitest": "^3.0.5"
"vitest": "catalog:"
},
"peerDependencies": {
"@supabase/auth-js": "catalog:",
Expand Down
2 changes: 1 addition & 1 deletion packages/generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"json-stringify-safe": "^5.0.1",
"lodash": "^4.17.21",
"tsconfig": "workspace:*",
"tsx": "^4.19.3"
"tsx": "catalog:"
}
}
4 changes: 2 additions & 2 deletions packages/pg-meta/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
},
"devDependencies": {
"@types/pg": "^8.11.11",
"@vitest/coverage-v8": "^3.0.9",
"@vitest/coverage-v8": "^3.2.0",
"npm-run-all": "^4.1.5",
"pg": "^8.13.1",
"postgres-array": "^3.0.2",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "^3.0.5"
"vitest": "catalog:"
}
}
8 changes: 4 additions & 4 deletions packages/ui-patterns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@
"@radix-ui/react-visually-hidden": "^1.1.3",
"@supabase/sql-to-rest": "^0.1.6",
"@supabase/supabase-js": "catalog:",
"@vitest/coverage-v8": "^3.0.9",
"@vitest/coverage-v8": "^3.2.0",
"class-variance-authority": "^0.6.0",
"clsx": "^1.2.1",
"cmdk": "^1.1.1",
Expand All @@ -512,7 +512,7 @@
"react-hook-form": "^7.45.0",
"react-intersection-observer": "^9.8.2",
"react-markdown": "^9.0.1",
"react-syntax-highlighter": "^15.5.0",
"react-syntax-highlighter": "^15.6.6",
"react-tooltip": "*",
"react-use": "^17.5.0",
"recharts": "^2.8.0",
Expand Down Expand Up @@ -541,12 +541,12 @@
"@types/react-dom": "catalog:",
"api-types": "workspace:*",
"next-router-mock": "^0.9.13",
"tsx": "^4.19.3",
"tsx": "catalog:",
"typescript": "catalog:",
"unified": "^11.0.5",
"vfile": "^6.0.3",
"vite": "catalog:",
"vitest": "^3.0.5"
"vitest": "catalog:"
},
"peerDependencies": {
"next": "catalog:"
Expand Down
8 changes: 4 additions & 4 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"react-intersection-observer": "^9.8.2",
"react-medium-image-zoom": "^5.2.4",
"react-resizable-panels": "^2.1.4",
"react-syntax-highlighter": "^15.5.0",
"react-syntax-highlighter": "^15.6.6",
"recharts": "^2.12.7",
"sonner": "^1.5.0",
"tailwind-merge": "^1.13.2",
Expand All @@ -88,16 +88,16 @@
"@types/react": "catalog:",
"@types/react-copy-to-clipboard": "^5.0.4",
"@types/react-dom": "catalog:",
"@types/react-syntax-highlighter": "^15.5.6",
"@vitest/coverage-v8": "^3.0.9",
"@types/react-syntax-highlighter": "^15.5.13",
"@vitest/coverage-v8": "^3.2.0",
"common": "workspace:*",
"config": "workspace:*",
"glob": "^8.1.0",
"style-dictionary": "^3.7.1",
"tsconfig": "workspace:*",
"typescript": "catalog:",
"vite": "catalog:",
"vitest": "^3.0.5"
"vitest": "catalog:"
},
"peerDependencies": {
"next": "catalog:"
Expand Down
Loading
Loading