C# Client Library
supabase-csharp
diff --git a/apps/docs/lib/constants.ts b/apps/docs/lib/constants.ts
index d1bbedbf47c..42c12c0d3f4 100644
--- a/apps/docs/lib/constants.ts
+++ b/apps/docs/lib/constants.ts
@@ -1,2 +1,3 @@
export const IS_PLATFORM = process.env.NEXT_PUBLIC_IS_PLATFORM === 'true'
export const LOCAL_SUPABASE = process.env.NEXT_PUBLIC_LOCAL_SUPABASE === 'true'
+export const API_URL = process.env.NEXT_PUBLIC_API_URL
diff --git a/apps/docs/lib/fetchWrappers.tsx b/apps/docs/lib/fetchWrappers.tsx
index c573a0d37dc..0313e49565f 100644
--- a/apps/docs/lib/fetchWrappers.tsx
+++ b/apps/docs/lib/fetchWrappers.tsx
@@ -1,7 +1,5 @@
interface DataProps {
- referrer?: string
- title: string
- route?: string
+ [prop: string]: any
}
export const post = (url: string, data: DataProps, options = {}) => {
diff --git a/apps/docs/pages/_app.tsx b/apps/docs/pages/_app.tsx
index 8563418f9a8..f2f415a6963 100644
--- a/apps/docs/pages/_app.tsx
+++ b/apps/docs/pages/_app.tsx
@@ -1,6 +1,6 @@
import { createBrowserSupabaseClient } from '@supabase/auth-helpers-nextjs'
import { SessionContextProvider } from '@supabase/auth-helpers-react'
-import { AuthProvider, ThemeProvider } from 'common'
+import { AuthProvider, ThemeProvider, useTelemetryProps } from 'common'
import { useRouter } from 'next/router'
import { useEffect, useState } from 'react'
import ReactMarkdown from 'react-markdown'
@@ -10,7 +10,7 @@ import { CommandMenuProvider } from 'ui'
import components from '~/components'
import Favicons from '~/components/Favicons'
import SiteLayout from '~/layouts/SiteLayout'
-import { IS_PLATFORM, LOCAL_SUPABASE } from '~/lib/constants'
+import { API_URL, IS_PLATFORM, LOCAL_SUPABASE } from '~/lib/constants'
import { post } from '~/lib/fetchWrappers'
import '../styles/ch.scss'
import '../styles/main.scss?v=1.0.0'
@@ -19,16 +19,21 @@ import '../styles/prism-okaidia.scss'
function MyApp({ Component, pageProps }: AppPropsWithLayout) {
const router = useRouter()
+ const telemetryProps = useTelemetryProps()
const [supabase] = useState(() =>
IS_PLATFORM || LOCAL_SUPABASE ? createBrowserSupabaseClient() : undefined
)
function handlePageTelemetry(route: string) {
- return post(`https://api.supabase.io/platform/telemetry/page`, {
+ return post(`${API_URL}/telemetry/page`, {
referrer: document.referrer,
title: document.title,
route,
+ ga: {
+ screen_resolution: telemetryProps?.screenResolution,
+ language: telemetryProps?.language,
+ },
})
}
@@ -85,12 +90,7 @@ function MyApp({ Component, pageProps }: AppPropsWithLayout) {
- (
-
- )}
- >
+
diff --git a/apps/docs/pages/guides/auth/auth-password-reset.mdx b/apps/docs/pages/guides/auth/auth-password-reset.mdx
new file mode 100644
index 00000000000..a6ecc280009
--- /dev/null
+++ b/apps/docs/pages/guides/auth/auth-password-reset.mdx
@@ -0,0 +1,109 @@
+import Layout from '~/layouts/DefaultGuideLayout'
+import { Accordion } from 'ui'
+
+export const meta = {
+ id: 'auth-password-reset',
+ title: 'Password Reset',
+ description: 'How to reset password with Supabase Auth',
+}
+
+- Send email for password reset using [`.resetPasswordForEmail`](/docs/reference/javascript/auth-resetpasswordforemail) while providing a `redirectTo` parameter
+- Email link will work as a magic link and log the user in then take them to the url specified in the `redirectTo` parameter
+- Create form to update the password and call the [`.updateUser`](/docs/reference/javascript/auth-updateuser) method with the new password
+
+## Single Page Application (SPA)
+
+### Sending password reset email
+Supabase provides a convenient method [`.resetPasswordForEmail`](/docs/reference/javascript/auth-resetpasswordforemail)
+to reset a user password. This method takes a parameter of `redirectTo` which we will use to pass an absolute URL to
+the update password page. This URL must be saved in your
+allowed [Redirect URLs](https://app.supabase.com/project/_/auth/url-configuration) list found at
+[Authentication > Redirect Configuration](https://app.supabase.com/project/_/auth/url-configuration) or it won't
+redirect the user.
+
+```ts
+await supabase.auth.resetPasswordForEmail('hello@example.com', {
+ redirectTo: 'http://example.com/account/update-password',
+})
+```
+
+### Email link
+The email link you receive will work like a magic link. This way when you click the link you will be logged into
+the website. Since we passed a redirect URL to the [`.resetPasswordForEmail`](https://supabase.com/docs/reference/javascript/auth-resetpasswordforemail)
+method the user should be sent to the update password page.
+
+### Update Password
+To update the password we call the [`.updateUser`](/docs/reference/javascript/auth-updateuser) method and pass along the new password to this method.
+
+```ts
+await supabase.auth.updateUser({ password: new_password })
+```
+
+## Server-Side Rendering (SSR)
+
+### Sending password reset email
+Supabase provides a convenient method [`.resetPasswordForEmail`](/docs/reference/javascript/auth-resetpasswordforemail)
+to reset a user password. This method takes a parameter of `redirectTo` which we will use to pass an absolute URL to
+the callback page along with a query parameter to the update password page. This URL must be saved in your
+allowed [Redirect URLs](https://app.supabase.com/project/_/auth/url-configuration) list found at
+[Authentication > Redirect Configuration](https://app.supabase.com/project/_/auth/url-configuration) or it won't
+redirect the user.
+
+```ts
+await supabase.auth.resetPasswordForEmail('hello@example.com', {
+ redirectTo: 'http://example.com/api/auth/callback?next=/account/update-password',
+})
+```
+
+
+
+We are using `next` as our query parameter, but this can name whatever you like.
+
+
+
+### Email link
+The email link you receive will behave like a magic link. When the link is clicked you will be sent to the `redirectTo` URL you specified that points to the path with the exchange code.
+
+### Exchange authorization code
+After redirecting to the server page, we need to retrieve the code from the query parameter called `code` and pass it to the `.exchangeAuthCodeForSession` function.
+```ts
+// api/auth/callback.ts
+
+// The code is retrieved from the query parameter - use whichever mechanism is recommended
+// for your app/framework. This is just an example.
+const code = url.searchParams.get('code')
+
+// call the Supabase API to exchange the code for a session
+await supabase.auth.exchangeCodeForSession(code)
+```
+
+
+
+The query parameter is always `code` for the authorization code returned from the Supabase API
+
+
+
+We will also need to check for the `next` query parameter to redirect the user to the update password page.
+```ts
+// api/auth/callback.ts
+
+// The password page path is retrieved from the query parameter - use whichever mechanism is recommended
+// for your app/framework. This is just an example.
+const next = url.searchParams.get('next')
+
+// using NextJS API response object in this example
+res.redirect(next)
+```
+
+### Update Password
+To update the password we call the [`.updateUser`](/docs/reference/javascript/auth-updateuser) method and
+pass along the new password to this method.
+
+```ts
+await supabase.auth.updateUser({ password: new_password })
+```
+
+export const Page = ({ children }) =>
+
+export default Page
+
diff --git a/apps/docs/pages/guides/getting-started/local-development.mdx b/apps/docs/pages/guides/getting-started/local-development.mdx
index ec33084b259..a4b787487cc 100644
--- a/apps/docs/pages/guides/getting-started/local-development.mdx
+++ b/apps/docs/pages/guides/getting-started/local-development.mdx
@@ -99,7 +99,7 @@ service_role key: eyJh......
```
-You can use the [supabase stop](/docs/reference/cli/usage#supabase-stop) command at any time to stop all services.
+You can use the [`supabase stop`](/docs/reference/cli/usage#supabase-stop) command at any time to stop all services and reset your local database. Use `supabase stop --backup` to stop all services without resetting your local database.
## Access your project's services
@@ -463,6 +463,7 @@ The local development environment is not as feature-complete as the Supabase Pla
- The Functions interface is coming soon.
- You cannot update your project settings in the Dashboard. This must be done using the CLI.
+- The CLI version determines the local version of Studio used, so make sure you keep your local [Supabase CLI up to date](https://github.com/supabase/cli#getting-started). We're constantly adding new features and bug fixes.
export const Page = ({ children }) =>
diff --git a/apps/docs/pages/guides/getting-started/tutorials/with-expo.mdx b/apps/docs/pages/guides/getting-started/tutorials/with-expo.mdx
index aa420134d55..d4b0805ec49 100644
--- a/apps/docs/pages/guides/getting-started/tutorials/with-expo.mdx
+++ b/apps/docs/pages/guides/getting-started/tutorials/with-expo.mdx
@@ -45,21 +45,21 @@ These variables will be exposed on the browser, and that's completely fine since
[Row Level Security](/docs/guides/auth#row-level-security) enabled on our Database.
```ts title=lib/supabase.ts
-import * as SecureStore from "expo-secure-store";
+import 'react-native-url-polyfill/auto'
+import * as SecureStore from 'expo-secure-store'
import { createClient } from '@supabase/supabase-js'
-
const ExpoSecureStoreAdapter = {
getItem: (key: string) => {
- return SecureStore.getItemAsync(key);
+ return SecureStore.getItemAsync(key)
},
setItem: (key: string, value: string) => {
- SecureStore.setItemAsync(key, value);
+ SecureStore.setItemAsync(key, value)
},
removeItem: (key: string) => {
- SecureStore.deleteItemAsync(key);
+ SecureStore.deleteItemAsync(key)
},
-};
+}
const supabaseUrl = YOUR_REACT_NATIVE_SUPABASE_URL
const supabaseAnonKey = YOUR_REACT_NATIVE_SUPABASE_ANON_KEY
diff --git a/apps/www/_blog/2020-09-03-supabase-alpha-august-2020.mdx b/apps/www/_blog/2020-09-03-supabase-alpha-august-2020.mdx
index 1a63a1a4bb9..b2c7ef0eabf 100644
--- a/apps/www/_blog/2020-09-03-supabase-alpha-august-2020.mdx
+++ b/apps/www/_blog/2020-09-03-supabase-alpha-august-2020.mdx
@@ -80,7 +80,7 @@ We have a number of small improvements:
- supabase-js now has [UMD support](https://github.com/supabase/supabase/pull/156)
- We significantly [improved our docs](/docs). Try out the new search!
-- All of our awesome sponsors are now listed [on our OSS page](/docs/oss).
+- All of our awesome sponsors are now listed [on our OSS page](/open-source).
### From the community
diff --git a/apps/www/_blog/2023-05-09-supabase-beta-update-april-2023.mdx b/apps/www/_blog/2023-05-09-supabase-beta-update-april-2023.mdx
new file mode 100644
index 00000000000..aaa8991391a
--- /dev/null
+++ b/apps/www/_blog/2023-05-09-supabase-beta-update-april-2023.mdx
@@ -0,0 +1,120 @@
+---
+title: Supabase Beta April 2023
+description: A review of Launch Week 7 and more exciting updates from last month.
+author: ant_wilson
+image: 2023-05-09-beta-update-april/monthly-update-april-2023.jpg
+thumb: 2023-05-09-beta-update-april/monthly-update-april-2023.jpg
+tags:
+ - release-notes
+date: '2023-05-09'
+toc_depth: 3
+---
+
+Brace yourself, this is one of the most feature-packed Beta Updates we've published so far.
+
+[Launch Week 7](https://supabase.com/launch-week) was a massive success with great feedback from the community. We also gave away lots of mechanical keyboards, including the Hackathon winner which we announce here!
+
+## Day 1 - Supabase Logs: open source logging server
+
+
+
+Logflare is the hub of analytics streams for Supabase. We are open sourcing it so that you can self-host your own Logging infrastructure.
+
+[Blog Post](https://supabase.com/blog/supabase-logs-self-hosted)\
+[Video overview](https://www.youtube.com/watch?v=Ai2BjHV36Ng)
+
+## Day 2 - Supabase Edge Runtime: Self-hosted Deno Functions
+
+
+
+You can now self-host Edge Functions and run them in local development using our new Edge Runtime. We published a guide showing how to self-host Edge Functions with Fly and what more is coming️
+
+[Blog post](https://supabase.com/blog/edge-runtime-self-hosted-deno-functions)\
+[Video overview](https://www.youtube.com/watch?v=cPGxPl1lx4Y)
+
+## Day 3 - Storage v3: Resumable Uploads with support for 50GB files
+
+
+
+Supabase Storage received many of the most requested features from our users: Resumable Uploads, Quality Filters, Next.js support, and WebP support.
+
+[Blog post](https://supabase.com/blog/storage-v3-resumable-uploads)\
+[Video overview](https://www.youtube.com/watch?v=pT2PcZFq_M0)
+
+## Day 4 - Supabase Auth: SSO, Mobile, and Server-side support
+
+
+
+On day 4, we introduced SSO with SAML 2.0, PKCE, and Sign in with Apple for iOS. It felt like acronym day, but it was actually Auth day!
+
+[Blog post](https://supabase.com/blog/supabase-auth-sso-pkce)\
+[Video overview](https://www.youtube.com/watch?v=hAwJeR6mhB0)
+
+## Day 5 - Supabase Studio 2.0 with new AI features
+
+
+
+Supabase Studio got a major upgrade that goes from redesigns to improved developer experience, and new tools. We have the features people have been asking for and new capabilities that will change the way you work.
+
+[Blog Post](https://supabase.com/blog/supabase-studio-2.0)\
+[Video overview](https://www.youtube.com/watch?v=0rcNqHt5KWU)
+
+## Community highlights
+
+
+
+Our community defines us. We're honored to work with, sponsor, and support incredible people and tools 💜. Our CEO wrote a highlight of the last 3 months.
+
+[Blog post](https://supabase.com/blog/launch-week-7-community-highlights)
+
+## Introducing dbdev: PostgreSQL Package Manager
+
+
+
+[database.dev](https://database.dev/) fills the same role for PostgreSQL as `npm` for JavaScript or `pip` for Python, it enables publishing libraries and applications for repeatable deployment. Our goal is to create an open ecosystem for packaging and discovering SQL.
+
+[Blog post](https://supabase.com/blog/dbdev)
+
+## More product announcements
+
+- Trusted Language Extensions for Postgres. [[Blog post]](https://supabase.com/blog/pg-tle)
+- What's New in pg_graphql v1.2. [[Blog post]](https://supabase.com/blog/whats-new-in-pg-graphql-v1-2)
+- GitHub Discussions are now a new knowledge source for search & AI (Troubleshooting category only for now). [[Check it out]](https://supabase.com/docs)
+- New API report with routing information for each chart, making it easier to debug API calls. [[PR]](https://github.com/supabase/supabase/pull/14063)
+- Storage permission changes: the developer role is now allowed to update the storage settings (previously was only owner and admin). [[PR]](https://github.com/supabase/supabase/pull/13883)
+
+
+## Launch Week 7 Hackathon winners
+
+
+
+The community is loving `pgvector` to build AI apps so we decided to make it part of the traditional Launch Week Hackathon. The quality of the apps was out of this world, it wasn't easy, but in the end, we selected [Page Assist](https://github.com/n4ze3m/page-assist) - by [@n4ze3m ](https://twitter.com/n4ze3m)as the winner of the Best Overall Project.
+
+[Full list of Winners](https://supabase.com/blog/launch-week-7-hackathon-winners)
+
+[See all the submissions](https://www.madewithsupabase.com/launch-week-7)
+
+## Mendable.ai switches from Pinecone to Supabase for PostgreSQL vector embeddings.
+
+
+
+With Supabase's pg_vector, Mendable.ai could build a more cost-effective solution that is just as performant - if not more performant - than other vector databases.
+
+[Read the full story](https://supabase.com/customers/mendableai)
+
+## From the community
+
+
+
+- FlutterFlow now supports Supabase Authentication. [Video guide](https://www.youtube.com/watch?v=tL-sLPfWzVE)
+- Supabase + ClickHouse: Combining the Best of the OLTP and OLAP Worlds. [Webinar](https://www.youtube.com/watch?v=LDWEsw41Zko)
+- Our friend Guillaume put together the most incredible course about Supabase, with the in and outs of the platform. [Full course](https://www.youtube.com/watch?v=8DTOTT7q0XA)
+- Supabase + LangChain starter template for building full stack AI apps. [Template](https://github.com/langchain-ai/langchain-template-supabase)
+- Creating a Books Tracker App with .NET MAUI and Supabase. [Article](https://hackernoon.com/creating-a-books-tracker-app-with-net-maui-and-supabase)
+- Vanta Case Study - Supabase turns trust into a revenue-generating opportunity with Vanta. [Case Study](https://www.vanta.com/customers/supabase)
+
+## Meme Zone
+
+As always, one of our favorite memes from last month. [Follow us on Twitter](https://twitter.com/supabase) for more.
+
+
diff --git a/apps/www/_customers/mendableai.mdx b/apps/www/_customers/mendableai.mdx
index 54f35d8b054..2e0a171087d 100644
--- a/apps/www/_customers/mendableai.mdx
+++ b/apps/www/_customers/mendableai.mdx
@@ -1,8 +1,8 @@
---
title: Mendable.ai switches from Pinecone to Supabase for PostgreSQL vector embeddings.
name: Mendable.ai
-description: How Mendable.ai boosts efficiency and accuracy of chat powered search for documentation using Supabase with pg_vector.
-author: rory_wilding
+description: How Mendable.ai boosts efficiency and accuracy of chat powered search for documentation using Supabase with pg_vector.
+author: paul_copplestone
author_title: Supabase
author_url: https://github.com/kiwicopple
author_image_url: https://avatars2.githubusercontent.com/u/10214025?s=400&u=c6775be2ae667e2acae3ccd347fed62bb3f5b3e7&v=4
@@ -24,31 +24,35 @@ misc: [{ label: 'Backed by', text: 'Y Combinator' }]
about: Mendable.ai is Chat Powered Search for Documentation.
---
-[Mendable.ai](http://mendable.ai/) provides a chat-powered search engine for technical documentation. Their AI-powered search tool makes it easier for developers and other technical users to find relevant information in complex documentation. Users can simply ask questions in natural language, and the tool returns the most relevant answers. [Mendable.ai](http://mendable.ai/)'s search engine also provides detailed analytics, which helps teams identify knowledge gaps and areas for improvement in their documentation.
+[Mendable.ai](http://mendable.ai/) provides a chat-powered search engine for technical documentation. Their AI-powered search tool makes it easier for developers and other technical users to find relevant information in complex documentation. Users can simply ask questions in natural language, and the tool returns the most relevant answers. Mendable.ai's search engine also provides detailed analytics, which helps teams identify knowledge gaps and areas for improvement in their documentation.
## The Challenge
-[Mendable.ai](http://mendable.ai/) needed to store and search through large amounts of vector data to improve the efficiency and accuracy of their similarity search operations for their Chat Powered Search for Documentation. They tried Faiss, Weviate, and Pinecone., but found them to be expensive and not very intuitive, especially when it came to storing metadata along with the vectors.
+Mendable.ai was experiencing tremendous success, with WAUs growing nearly 300% since March, and started looking for a tool to store and search through large amounts of vector data to improve the efficiency and accuracy of their similarity search operations for their Chat Powered Search for Documentation. They tried Faiss, Weviate, and Pinecone, but found them to be expensive and not very intuitive, especially when it came to storing metadata along with the vectors.
Why they chose Supabase:
-[Mendable.ai](http://mendable.ai/) discovered that Supabase supports pg_vector and found it to be a simple and cost-effective solution. They were impressed with the open-source nature of Supabase, as well as its ability to store metadata alongside the vectors. They also appreciated the intuitive interface and ease of use.
+Mendable.ai discovered that Supabase supports pgvector and found it to be a simple and cost-effective solution. They were impressed with the open source nature of Supabase, as well as its ability to store metadata alongside the vectors. They also appreciated the intuitive interface and ease of use.
- We tried other vector databases - we tried Faiss, we tried Weviate, we tried Pinecone. We found them to be incredibly expensive and not very intuitive. If you’re just doing vector search they’re great, but if you need to store a bunch of metadata that becomes a huge pain.
+ We tried other vector databases - we tried Faiss, we tried Weviate, we tried Pinecone. We found
+ them to be incredibly expensive and not very intuitive. If you’re just doing vector search they’re
+ great, but if you need to store a bunch of metadata that becomes a huge pain.
## What They Built
-Using Supabase's pg_vector, [Mendable.ai](http://mendable.ai/) was able to build a more efficient and accurate search function for their AI chatbot. By storing vector data alongside metadata in Supabase, [Mendable.ai](http://mendable.ai/) was able to quickly and easily search through their customers documentation to find the most relevant responses to queries. They found that Supabase's solution was just as performant as dedicated vector databases, but without the high cost.
+Using Supabase and pgvector, Mendable.ai was able to build a more efficient and accurate search function for their AI chatbot. By storing vector data alongside metadata in Supabase, Mendable.ai was able to quickly and easily search through their customers documentation to find the most relevant responses to queries. They found that Supabase's solution was just as performant as dedicated vector databases, but without the high cost.
## The Results
-Thanks to Supabase's pg_vector, [Mendable.ai](http://mendable.ai/) was able to significantly improve the efficiency and accuracy of their Chat Powered Search for Documentation. They were able to build faster and more cost-effectively using Supabase’s open source stack.
+Thanks to Supabase and pgvector, Mendable.ai was able to significantly improve the efficiency and accuracy of their Chat Powered Search for Documentation. They were able to build faster and more cost-effectively using Supabase’s open source stack.
## Tech stack
-[Mendable.ai](http://mendable.ai/)'s tech stack includes React, Next.js, Express, Vercel, and Supabase.
+Mendable.ai's tech stack includes React, Next.js, Express, Vercel, and Supabase.
- We looked at the alternatives and chose Supabase because it’s open source, it’s simpler, and, for all the ways we need use it, Supabase has been just as performant - if not more performant - than the other vector databases.
+ We looked at the alternatives and chose Supabase because it’s open source, it’s simpler, and, for
+ all the ways we need use it, Supabase has been just as performant - if not more performant - than
+ the other vector databases.
diff --git a/apps/www/components/Features/index.tsx b/apps/www/components/Features/index.tsx
index b5c8dc3f68f..ab6510718e5 100644
--- a/apps/www/components/Features/index.tsx
+++ b/apps/www/components/Features/index.tsx
@@ -1,12 +1,52 @@
-import { Button, Badge, IconArrowRight } from 'ui'
-import SectionHeader from 'components/UI/SectionHeader'
+import { Badge } from 'ui'
import Solutions from 'data/Solutions.json'
-import Link from 'next/link'
+import Telemetry from '~/lib/telemetry'
+import gaEvents from '~/lib/gaEvents'
import SectionContainer from '../Layouts/SectionContainer'
import ProductIcon from '../ProductIcon'
import TextLink from '../TextLink'
+import { useTelemetryProps } from 'common/hooks/useTelemetryProps'
+import { useRouter } from 'next/router'
const Features = () => {
+ const router = useRouter()
+ const telemetryProps = useTelemetryProps()
+
+ const sendTelemetryEvent = async (product: any) => {
+ switch (product) {
+ case 'Database':
+ return await Telemetry.sendEvent(
+ gaEvents['www_hp_subhero_products_database'],
+ telemetryProps,
+ router
+ )
+ case 'Authentication':
+ return await Telemetry.sendEvent(
+ gaEvents['www_hp_subhero_products_auth'],
+ telemetryProps,
+ router
+ )
+ case 'Storage':
+ return await Telemetry.sendEvent(
+ gaEvents['www_hp_subhero_products_storage'],
+ telemetryProps,
+ router
+ )
+ case 'Edge Functions':
+ return await Telemetry.sendEvent(
+ gaEvents['www_hp_subhero_products_edgeFunctions'],
+ telemetryProps,
+ router
+ )
+ case 'Realtime':
+ return await Telemetry.sendEvent(
+ gaEvents['www_hp_subhero_products_realtime'],
+ telemetryProps,
+ router
+ )
+ }
+ }
+
const IconSections = Object.values(Solutions).map((solution: any) => {
const { name, description, icon, label, url } = solution
if (solution.name === 'Realtime') return null
@@ -24,7 +64,13 @@ const Features = () => {
{label}