The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
auth-facebook.mdx (work in progress)
Mark Burggraf4fbca33752f5
diff --git a/web/docs/guides2/auth-facebook.mdx b/web/docs/guides2/auth-facebook.mdxnew file mode 100644index 00000000000..cde82ffe4a9--- /dev/null+++ b/web/docs/guides2/auth-facebook.mdx@@ -0,0 +1,90 @@+---+id: auth-facebook+title: "Facebook Login"+description: Setting up Facebook Login+---++import Tabs from '@theme/Tabs';+import TabItem from '@theme/TabItem';++### Setting up Facebook Login++## Description++Adding a Facebook Login button to your application is easy if you follow these steps.++The setup process consists of three parts:++* Create and configure a Facebook Application on the [Facebook Devalopers Site](https://developers.facebook.com)+* Add your Facebook keys to your [Supabase Project](https://supabase.io)+* Add the login code to your [Supabase JS Client App](https://github.com/supabase/supabase-js)++## Environment++* [Supabase JS Client](https://github.com/supabase/supabase-js)+* [Supabase Dashboard (UI)](https://supabase.io)+* [Facebook Developers Dashboard](https://developers.facebook.com/)++## Requirements+* Supabase account (Free Tier OK)+* Any existing Supabase Project+* Javascript-based client application (Angular, React, Vue, etc.)++## Steps++### Create a Facebook Developer Account++First, you'll need a Developer Account at [https://developers.facebook.com](https://developers.facebook.com).++### Create a Facebook App++Once logged into *"Facebook for Developers"*:++- Click on "My Apps" at the top right.+- Click "Create App" near the top right.+- Select your app type and click "Continue".+- Fill in your app information, then click "Create App".+- This should bring you to the screen: "Add Products to Your App". (Alternatively you can click on "Add Product" in the left sidebar to get to this screen.)++### Set up FaceBook Login for your Facebook App++From the "Add Products to your App" screen:++- Click "Setup" under "Facebook Login"+- Skip the Quickstart screen, instead, in the left sidebar, click "Settings" under "Facebook Login"+- Enter your callback URI under "Valid OAuth Redirect URIs" on the "Facebook Login Settings" page+ - Your OAuth Redirect URI looks like this:+ - https://xxxxxxxxxxxxxxxx.supabase.co/auth/v1/callback+ - where https://xxxxxxxxxxxxxxxx.supabase.co is your Supabase Project API URL+ - Go to your [Supasebase Project Dashboard](https://supabase.io)+ - Click on the "Settings" icon at the bottom of the left sidebar+ - Click on "API" in the list+ - Under Config / URL you'll find your API URL, you can click "Copy" to copy it to the clipboard+ - Now just add "/auth/v1/callback" to the end of that to get your full "OAauth Redirect URI"+ - Enter this in the "Valid OAuth Redirect URIs" box+ - Click "Save Changes" at the bottom right++### Copy your Facebook App ID and Secret++- Click "Settings / Basic" in the left sidebar+- Copy your App ID from the top of the "Basic Settings" page+- Under "App Secret" click "Show" then copy your secret++### Enter your Facebook App ID and Secret into your Supabase Project++- Go to your [Supasebase Project Dashboard](https://supabase.io)+- In the left sidebar, click the "Authentication" icon (near the top)+- Click "Settings" from the list to go to the "Authentication Settings" page+- Enter the final (hosted) URL of your app under "Site URL" (this is important)+- Under "External OAuth Providers" turn "Facebook Enabled" to ON+- Enter your "Facebook client ID" and "Facebook secret" saved in the previous step+- Click "Save"++### TODO - JavaScript Client API+++## Resources++* [Supabase Account - Free Tier OK](https://supabase.io)+* [Supabase JS Client](https://github.com/supabase/supabase-js)+* [Facebook Developers Dashboard](https://developers.facebook.com/)\ No newline at end of filediff --git a/web/sidebars.js b/web/sidebars.jsindex f99734fc6e8..0b3817bb95f 100755--- a/web/sidebars.js+++ b/web/sidebars.js@@ -88,7 +88,7 @@ module.exports = {type: 'category',label: 'Guides2',collapsed: false,- items: ['guides2/arrays', 'guides2/json', 'guides2/password-reset'],+ items: ['guides2/arrays', 'guides2/json', 'guides2/password-reset', 'guides2/auth-facebook'],},{type: 'category',