Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore(docs): update local development guide with more details for auth setup

Qiao Han6a9099201036
diff --git a/apps/docs/pages/guides/getting-started/local-development.mdx b/apps/docs/pages/guides/getting-started/local-development.mdx
index 69de419386b..c0ef6da032a 100644
--- a/apps/docs/pages/guides/getting-started/local-development.mdx
+++ b/apps/docs/pages/guides/getting-started/local-development.mdx
@@ -413,17 +413,31 @@ supabase functions deploy <function_name>
### Use Auth locally
-To use Auth locally, update your project's `supabase/config.toml` file that gets created after running `supabase init`. Add any providers you want, and set enabled to `true`
+To use Auth locally, update your project's `supabase/config.toml` file that gets created after running `supabase init`. Add any providers you want, and set enabled to `true`.
```bash config.toml
[auth.external.github]
enabled = true
-client_id = ""
-secret = ""
+client_id = "env($SUPABASE_AUTH_GITHUB_CLIENT_ID)"
+secret = "env($SUPABASE_AUTH_GITHUB_SECRET)"
+redirect_uri = "http://localhost:54321/auth/v1/callback"
+```
+
+As a best practice, any secret values should be loaded from environment variables. You can add them to `supabase/.env` for the CLI to automatically substitute them.
+
+```bash supabase/.env
+SUPABASE_AUTH_GITHUB_CLIENT_ID=<redacted>
+SUPABASE_AUTH_GITHUB_SECRET=<redacted>
```
For these changes to take effect, you need to run `supabase stop` and `supabase start` again.
+If you have additional RLS policies defined on your `auth` schema, you can pull them as a migration file locally.
+
+```bash
+supabase db remote commit --schema auth
+```
+
### Enabling Local Logging
Local logs rely on the Supabase Analytics Server. This can be enabled via the CLI configuration, and requires a Google Cloud project and BigQuery access.
@@ -462,8 +476,7 @@ This will switch the logging drivers and will direct logs to the Analytics serve
The local development environment is not as feature-complete as the Supabase Platform. We're working towards parity between the hosted platform and the local environment. Here are some of the differences:
-- The Functions interface is coming soon.
-- You cannot update your project settings in the Dashboard. This must be done using the CLI.
+- You cannot update your project settings in the Dashboard. This must be done using the local config file.
- 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 }) => <Layout meta={meta} children={children} />