The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
Suggested Auth updates - for Ant to review
Paul Copplestoneca17c55a1c89
diff --git a/www/components/Sections/GithubExamples.tsx b/www/components/Sections/GithubExamples.tsxindex f973f8acb91..0b45687a9b7 100644--- a/www/components/Sections/GithubExamples.tsx+++ b/www/components/Sections/GithubExamples.tsx@@ -42,7 +42,6 @@ function GithubExamples() {Supported by a network of early advocates, contributors,and champions.</p>- <p>Supabase would not be possible without them.</p></Typography.Text><div className="flex space-y-1.5 flex-col lg:space-y-0 lg:space-x-1.5 lg:flex-row justify-center"><Linkdiff --git a/www/components/Sections/TwitterSocialProof.tsx b/www/components/Sections/TwitterSocialProof.tsxindex b496c610cef..a5288275e31 100644--- a/www/components/Sections/TwitterSocialProof.tsx+++ b/www/components/Sections/TwitterSocialProof.tsx@@ -42,10 +42,7 @@ function TwitterSocialProof() {<Typography.Title level={2}>Join the community</Typography.Title><Typography.Text><p className="lg:text-lg">- The supabase team is overwhelmed with the support from early advocates, contributors,- and champions.- <br />- Supabase would not be possible without them.+ Supported by a network of early advocates, contributors, and champions.</p><div className="my-4"><Linkdiff --git a/www/data/products/auth/auth-api-examples.js b/www/data/products/auth/auth-api-examples.jsindex af6e95be3d6..fa745dd414f 100644--- a/www/data/products/auth/auth-api-examples.js+++ b/www/data/products/auth/auth-api-examples.js@@ -1,38 +1,102 @@export default [{lang: 'js',- title: 'Create user',- description: 'Sign up a new user in an example chat room',- code: `import { createClient } from '@supabase/supabase-js'-- // Initialize- const supabaseUrl = 'https://chat-room.supabase.co'- const supabaseKey = 'public-anon-key'- const supabase = createClient(supabaseUrl, supabaseKey)-- // Create a new user+ title: 'Sign up',+ description: '',+ code: `+ // Sign up with emailconst { user, error } = await supabase.auth.signUp({email: '[email protected]',password: 'example-password',})++++++++++++++ `,+ },+ {+ lang: 'js',+ title: 'Sign in',+ description: '',+ code: `+ // Sign in with email+ const { user, error } = await supabase.auth.signIn({+ email: '[email protected]',+ password: 'example-password',+ })++++++++++++`,},{lang: 'js',- title: 'Update a user',- description: 'Update a user',- code: `import { createClient } from '@supabase/supabase-js'-- // Initialize- const supabaseUrl = 'https://chat-room.supabase.co'- const supabaseKey = 'public-anon-key'- const supabase = createClient(supabaseUrl, supabaseKey)+ title: 'Magic Links',+ description: '',+ code: `+ // Sign in with magic links+ const { user, error } = await supabase.auth.signIn({+ email: '[email protected]'+ })+++++- // Update multiple users- const updatedUsers = await supabase- .from('users')- .eq('account_type', 'paid')- .update({ highlight_color: 'gold' })- `,+++++++++ `,+ },+ {+ lang: 'js',+ title: 'OAuth logins',+ description: '',+ code: `+ // Sign in with GitHub+ // And request extra permissions!+ const { user, error } = await supabase.auth.signIn({+ provider: 'github',+ }, {+ scopes: 'repo gist notifications'+ })+++++++++++++ `,},]diff --git a/www/data/products/auth/auth-sql-rules-examples.js b/www/data/products/auth/auth-sql-rules-examples.jsindex 04d24daecf0..86464290881 100644--- a/www/data/products/auth/auth-sql-rules-examples.js+++ b/www/data/products/auth/auth-sql-rules-examples.js@@ -7,19 +7,21 @@ export default [badges_label: '',badges: [],url: 'https://supabase.io/docs/guides/auth#allow-read-access',- code: `create table profiles (+ code: `+-- 1. Create table+create table profiles (id serial primary key,- username text unique,- avatar_url+ name text);-alter table profiles- enable row level security;+-- 2. Enable RLS+alter table profiles enable row level security;+-- 3. Create Policycreate policy "Public profiles are viewable by everyone."- on profiles for select using (- true- );`,+on profiles for select+using ( true );+`.trim(),},{lang: 'sql',@@ -30,52 +32,53 @@ create policy "Public profiles are viewable by everyone."badges_label: '',badges: [],url: 'https://supabase.io/docs/guides/auth#restrict-updates',- code: `-- 1. Create table- create table profiles (- id uuid references auth.users,- avatar_url text- );-- -- 2. Enable RLS- alter table profiles- enable row level security;-- -- 3. Create Policy- create policy "Users can update their own profiles."- on profiles for update using (- auth.uid() = id- );`,+ code: `+-- 1. Create table+create table profiles (+ id serial primary key,+ name text+);++-- 2. Enable RLS+alter table profiles enable row level security;++-- 3. Create Policy+create policy "Users can update their own profiles."+on profiles for update+using ( auth.uid() = id );+`.trim(),},{lang: 'sql',- title: 'Policies with joins',+ title: 'Advanced rules',detail_title: 'Team members can update team details',detail_text:'Create a policy that allows for team members to update only rows which match their team ID.',badges_label: '',badges: [],url: 'https://supabase.io/docs/guides/auth#policies-with-joins',- code: `create table teams (+ code: `+create table teams (id serial primary key,- name+ name text);--- Many to many joins+create table members (team_id references team.id,user_id referenced auth.users.id);-alter table teams- enable row level security;+alter table teams enable row level security;+-- Create Advanced Policiescreate policy "Team members can update team details"- on teams- for update using (- auth.uid() in (- select user_id- from memebers- where team_id = id- )- );`,+on teams+for update using (+ auth.uid() in (+ select user_id from members+ where team_id = id+ )+);+`.trim(),},]diff --git a/www/pages/auth/Auth.tsx b/www/pages/auth/Auth.tsxindex 239fe362998..0f2afd687da 100644--- a/www/pages/auth/Auth.tsx+++ b/www/pages/auth/Auth.tsx@@ -78,13 +78,13 @@ function AuthPage() {title={Solutions['authentication'].name}h1={[<span key={'authentication-h1'}>- Built-in user mangement- <br /> (that you can afford)+ Open Source Auth+ <br /> (without the integrations)</span>,]}subheader={[- 'An open source scalable object store, capable of holding any file and file size you like.',- 'With custom policies and permissions that are familair, easy to implement and unlimited scalable storage.',+ 'Every Supabase project comes with a complete User Management system that works without any additional tools.',+ "Including PostgreSQL's policy engine, for fine-grained access rules.",]}image={[<img@@ -128,8 +128,8 @@ function AuthPage() {<Typography.Title level={4}>All the social providers</Typography.Title><Typography.Text><p className="text-base lg:text-lg">- We provide all the popular social logins you expect. Google, Facebook, Github,- Azure, Gitlab and Bitbucket.+ Enable social logins with the click of a button. Google, Facebook, Github, Azure,+ Gitlab and Bitbucket.</p><Space><img src={`${basePath}/images/product/auth/twitter-icon.svg`} width={21} />@@ -146,9 +146,9 @@ function AuthPage() {<Typography.Title level={4}>Fully integrated</Typography.Title><Typography.Text><p className="text-base lg:text-lg">- Auth built into your project, with no need for external authentication services.+ Incredibly simple Auth, without a single external authentication service.</p>- <p>Use your own custom domains with SMTP settings.</p>+ <p>Built-in Authentication, Authorization, and User Management.</p></Typography.Text></div><div className="col-span-12 lg:col-span-3 lg:col-start-9">@@ -158,10 +158,10 @@ function AuthPage() {<Typography.Title level={4}>Own your data</Typography.Title><Typography.Text><p className="text-base lg:text-lg">- Keep all your user data in your supabase project so you never have to worry about- 3rd party privacy issues.+ User data stored in your Supabase database so you never have to worry about 3rd+ party privacy issues.</p>- <p>Supabase is GDPR / CPA Compliant.</p>+ <p>Host your data in 8 different regions.</p></Typography.Text></div></div>@@ -169,20 +169,21 @@ function AuthPage() {<SectionContainer className="-mb-48"><APISection- title="Simple and convenient APIs"+ title="Simple APIs"// @ts-ignorecontent={ApiExamples}size="large"text={[<Typography.Text><p className="text-base lg:text-lg">- An API built from the groud up for server and client side authentication that is- fast to implement.- </p>- <p>- With powerful library clients coming soon that allow for asset optimasation and- image transformation+ APIs that you can understand. With powerful libraries that work on client and+ server-side applications.</p>+ {/* I think less is more here ... */}+ {/* <p>+ With powerful client libraries that work on both client and server-side+ applications.+ </p> */}</Typography.Text>,]}footer={[@@ -191,14 +192,14 @@ function AuthPage() {<FeatureColumnicon={<IconBriefcase />}title="Enterprise logins"- text="Support for SAML, Azure, and Okta."+ text="Support for SAML, Azure. More enterprise providers and SSO coming soon."/></div><div className="col-span-12 sm:col-span-6 lg:col-span-12 xl:col-span-4"><FeatureColumnicon={<IconEye />}title="Social login scopes"- text="Request additonal user data permissions when using social logins"+ text="Request additonal user data permissions when using social logins."/></div></div>,@@ -226,13 +227,14 @@ function AuthPage() {<SectionContainer><div className="grid grid-cols-12 lg:gap-16"><div className="col-span-12 lg:col-span-5 mb-8">- <Typography.Title level={2}>No middleware user permission</Typography.Title>+ <Typography.Title level={2}>User permissions without the middleware</Typography.Title><Typography.Text><p className="text-base lg:text-lg">- Restrict user access with row level security, even without prior knowledge of SQL.- Control who can create, edit and delete specific rows in your database.+ Supabase Auth works without any additional servers. Build Authorization rules with+ Postgres' Row Level Security, controlling who can create, edit+ and delete specific rows in your database.</p>- <p>Polcies can be written in SQL or using the dashboard online.</p>+ <p>Policies can be written in SQL or using the dashboard online.</p></Typography.Text><Link href="https://supabase.io/docs/guides/auth#policy-examples"><a>@@ -268,14 +270,14 @@ function AuthPage() {</Space><Typography.Title level={2} className="mb-4">- React Auth component+ React Auth</Typography.Title><Typography.Text><p className="text-base lg:text-lg">- Bring authentication to your React app without coding a single form.+ Pre-built auth widgets to get started in minutes.</p><p>- We provide a React component that handles all the usual needs for logging in,+ Supabase provides React libraries which handle common scenarios, including logging in,signing up, magic link and forgot password forms.</p></Typography.Text>@@ -301,8 +303,8 @@ function AuthPage() {<div className="col-span-12 lg:col-span-12 xl:col-span-4"><FeatureColumnicon={<IconEye />}- title="User context"- text="Includes a React hook that provides a user session context provider so you can display the right parts of your app for logged in users."+ title="User context hooks"+ text="Access the auth status from any component."/></div></div>diff --git a/www/pages/database/Database.tsx b/www/pages/database/Database.tsxindex fd07ef16db3..79a789d72f3 100644--- a/www/pages/database/Database.tsx+++ b/www/pages/database/Database.tsx@@ -85,7 +85,7 @@ function Database() {title={Solutions['database'].name}h1={[<span key={'database-h1'}>- Open source SQL Database+ Open Source SQL Database<br /> (without the hassle)</span>,]}