mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem Flavor of #41370 , but we can see that at least some traffic for this search query is searching using phrases like `supabase password reset` and `supabase password` and then accidentally find themselves on the `/docs/guides/auth/passwords` page. You can see this through user flow mappings in PostHog + also in search query traffic in Google Search Console. <img width="1261" height="669" alt="image" src="https://github.com/user-attachments/assets/70af109c-dbc8-42c2-887a-63133f3f82d5" /> <img width="1128" height="669" alt="image" src="https://github.com/user-attachments/assets/52358d87-55a8-4491-ad26-a0d390ebe55b" /> ## Solution Renames the placeholder across docs / studio / www to `[YOUR-DATABASE-PASSWORD]` and adds an admonition to the current `/docs/guides/auth/passwords` to direct folks to the correct place. Might also be a UX fix in the dash.... but poking into it feel like we already have a lot of affordances there already (`Reset database password` button on the direct connection panel + quick search action for `Reset database password`). ## Preview links ### Studio `https://studio-staging-obj7agk56-supabase.vercel.app/dashboard/project/$PROJECT?showConnect=true&connectTab=direct` <img width="1128" height="801" alt="image" src="https://github.com/user-attachments/assets/420c8582-97bd-45ff-914e-ea9bb25aed91" /> ### Docs https://docs-git-kody-devrel-866-database-password-placeholder-supabase.vercel.app/docs/guides/auth/passwords <img width="838" height="463" alt="image" src="https://github.com/user-attachments/assets/c4bb0242-6ff7-4de7-90c7-386818649209" /> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
19 lines
753 B
TypeScript
19 lines
753 B
TypeScript
export const DB_PASSWORD_PLACEHOLDER = '[YOUR-DATABASE-PASSWORD]'
|
|
|
|
export function buildDirectPostgresConnectionUri(settings: {
|
|
db_user: string
|
|
db_host: string
|
|
db_port: number
|
|
db_name: string
|
|
}): string {
|
|
return `postgresql://${settings.db_user}:${DB_PASSWORD_PLACEHOLDER}@${settings.db_host}:${settings.db_port}/${settings.db_name}`
|
|
}
|
|
|
|
export function buildLogicalBackupShellScript(connectionUri: string): string {
|
|
return [
|
|
`npx supabase db dump --db-url '${connectionUri}' -f roles.sql --role-only`,
|
|
`npx supabase db dump --db-url '${connectionUri}' -f schema.sql`,
|
|
`npx supabase db dump --db-url '${connectionUri}' -f data.sql --use-copy --data-only -x "storage.buckets_vectors" -x "storage.vector_indexes"`,
|
|
].join('\n')
|
|
}
|