The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
docs: add page for figma provider
Benjamin Tan0bdbde7e2131
diff --git a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.tsindex e7891666c66..de7a47f387a 100644--- a/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts+++ b/apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts@@ -349,6 +349,11 @@ export const SocialLoginItems = [icon: '/docs/img/icons/discord-icon',url: '/guides/auth/social-login/auth-discord',},+ {+ name: 'Figma',+ icon: '/docs/img/icons/figma-icon',+ url: '/guides/auth/social-login/auth-figma',+ },{name: 'Keycloak',icon: '/docs/img/icons/keycloak-icon',diff --git a/apps/docs/data/authProviders.ts b/apps/docs/data/authProviders.tsindex a1053a30772..b4825a08bef 100644--- a/apps/docs/data/authProviders.ts+++ b/apps/docs/data/authProviders.ts@@ -49,6 +49,16 @@ const authProviders = [selfHosted: true,authType: 'social',},+ {+ name: 'Figma',+ logo: '/docs/img/icons/figma-icon',+ href: '/guides/auth/social-login/auth-figma',+ official: true,+ supporter: 'Supabase',+ platform: true,+ selfHosted: true,+ authType: 'social',+ },{name: 'GitHub',logo: '/docs/img/icons/github-icon',diff --git a/apps/docs/pages/guides/auth/social-login/auth-figma.mdx b/apps/docs/pages/guides/auth/social-login/auth-figma.mdxnew file mode 100644index 00000000000..1b7ce0b5305--- /dev/null+++ b/apps/docs/pages/guides/auth/social-login/auth-figma.mdx@@ -0,0 +1,77 @@+import Layout from '~/layouts/DefaultGuideLayout'++export const meta = {+ id: 'auth-figma',+ title: 'Login with Figma',+ description: 'Add Figma OAuth to your Supabase project',+}++To enable Figma Auth for your project, you need to set up a Figma OAuth application and add the application credentials to your Supabase Dashboard.++## Overview++Setting up Figma logins for your application consists of 3 parts:++- Create and configure a Figma App on the [Figma Developers page](https://www.figma.com/developers).+- Add your Figma `client_id` and `client_secret` to your [Supabase Project](https://app.supabase.com).+- Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js).++## Access the Figma Developers page++- Go to the [Figma Developers page](https://www.figma.com/developers)+- Click on `My apps` at the top right+- Log in (if necessary)++++## Find your callback URL++<SocialProviderSetup provider="Figma" />++## Create a Figma OAuth app++- Enter your `App name`, `Website URL` and upload your app logo+- Click on `Add callback`+- Add your `Callback URL`+- Click on `Save`++++- Copy and save your newly-generated `Client ID`+- Copy and save your newly-generated `Client Secret`++++## Enter your Figma credentials into your Supabase Project++<SocialProviderSettingsSupabase provider="Figma" />++## Add login code to your client app++When your user signs in, call [signInWithOAuth()](/docs/reference/javascript/auth-signinwithoauth) with `figma` as the `provider`:++```js+async function signInWithFigma() {+ const { data, error } = await supabase.auth.signInWithOAuth({+ provider: 'figma',+ })+}+```++When your user signs out, call [signOut()](/docs/reference/javascript/auth-signout) to remove them from the browser session and any objects from localStorage:++```js+async function signout() {+ const { error } = await supabase.auth.signOut()+}+```++## Resources++- [Supabase Account - Free Plan OK](https://supabase.com)+- [Supabase JS Client](https://github.com/supabase/supabase-js)+- [Figma Developers page](https://www.figma.com/developers)++export const Page = ({ children }) => <Layout meta={meta} children={children} />++export default Pagediff --git a/apps/docs/public/img/guides/auth-figma/figma_app_credentials.png b/apps/docs/public/img/guides/auth-figma/figma_app_credentials.pngnew file mode 100755index 00000000000..e4d582ab9fbBinary files /dev/null and b/apps/docs/public/img/guides/auth-figma/figma_app_credentials.png differdiff --git a/apps/docs/public/img/guides/auth-figma/figma_create_app.png b/apps/docs/public/img/guides/auth-figma/figma_create_app.pngnew file mode 100755index 00000000000..7caeb2c0057Binary files /dev/null and b/apps/docs/public/img/guides/auth-figma/figma_create_app.png differdiff --git a/apps/docs/public/img/guides/auth-figma/figma_developers_page.png b/apps/docs/public/img/guides/auth-figma/figma_developers_page.pngnew file mode 100755index 00000000000..8ceee422d79Binary files /dev/null and b/apps/docs/public/img/guides/auth-figma/figma_developers_page.png differdiff --git a/apps/docs/public/img/icons/figma-icon.svg b/apps/docs/public/img/icons/figma-icon.svgnew file mode 100644index 00000000000..38539ba64cd--- /dev/null+++ b/apps/docs/public/img/icons/figma-icon.svg@@ -0,0 +1 @@+<svg width="300" height="300" viewBox="-50 0 300 300" xmlns="http://www.w3.org/2000/svg"><style>.st0{fill:#0acf83}.st1{fill:#a259ff}.st2{fill:#f24e1e}.st3{fill:#ff7262}.st4{fill:#1abcfe}</style><path id="path0_fill" class="st0" d="M50 300c27.6 0 50-22.4 50-50v-50H50c-27.6 0-50 22.4-50 50s22.4 50 50 50z"/><path id="path1_fill" class="st1" d="M0 150c0-27.6 22.4-50 50-50h50v100H50c-27.6 0-50-22.4-50-50z"/><path id="path1_fill_1_" class="st2" d="M0 50C0 22.4 22.4 0 50 0h50v100H50C22.4 100 0 77.6 0 50z"/><path id="path2_fill" class="st3" d="M100 0h50c27.6 0 50 22.4 50 50s-22.4 50-50 50h-50V0z"/><path id="path3_fill" class="st4" d="M200 150c0 27.6-22.4 50-50 50s-50-22.4-50-50 22.4-50 50-50 50 22.4 50 50z"/></svg>