@nextblock-cms/db 0.2.32 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/cache-Bb4TkKGq.js +38 -0
  2. package/cache-D0Q6YeSV.mjs +10150 -0
  3. package/index.cjs.js +1 -1
  4. package/index.es.js +66 -61
  5. package/package.json +1 -1
  6. package/server.cjs.js +1 -1
  7. package/server.es.js +48 -43
  8. package/supabase/config.toml +330 -319
  9. package/supabase/functions/import_map.json +6 -0
  10. package/supabase/functions/nextblock-migration-ingest/index.d.ts +1 -0
  11. package/supabase/functions/nextblock-migration-ingest/index.js +519 -0
  12. package/supabase/functions/nextblock-migration-ingest/index.js.map +7 -0
  13. package/supabase/functions/nextblock-migration-ingest/index.ts +646 -0
  14. package/supabase/migrations/00000000000000_setup_foundation_and_enums.sql +40 -0
  15. package/supabase/migrations/00000000000001_setup_cms_core.sql +124 -0
  16. package/supabase/migrations/00000000000002_setup_content_tables.sql +138 -0
  17. package/supabase/migrations/00000000000003_setup_catalog_and_licensing.sql +160 -0
  18. package/supabase/migrations/00000000000004_setup_fulfillment_shipping_taxes_and_currencies.sql +797 -0
  19. package/supabase/migrations/00000000000005_setup_functions_and_triggers.sql +767 -0
  20. package/supabase/migrations/00000000000006_setup_rls_and_grants.sql +872 -0
  21. package/supabase/migrations/00000000000007_setup_indexes.sql +158 -0
  22. package/supabase/migrations/00000000000008_seed_platform_defaults.sql +155 -0
  23. package/supabase/migrations/00000000000009_seed_translations.sql +801 -0
  24. package/supabase/migrations/00000000000010_seed_content_scaffold.sql +1088 -0
  25. package/supabase/migrations/00000000000011_setup_cortex_ai_settings.sql +81 -0
  26. package/supabase/migrations/00000000000012_setup_commerce_coupons.sql +275 -0
  27. package/supabase/migrations/00000000000013_setup_cortex_ai_db_mutation_audit.sql +47 -0
  28. package/supabase/migrations/00000000000014_setup_content_drafts.sql +119 -0
  29. package/supabase/migrations/00000000000015_setup_product_drafts.sql +97 -0
  30. package/supabase/migrations/00000000000016_add_feature_image_to_pages.sql +8 -0
  31. package/supabase/migrations/00000000000017_add_product_blocks.sql +118 -0
  32. package/supabase/migrations/00000000000018_setup_bot_protection_settings.sql +77 -0
  33. package/supabase/migrations/00000000000019_add_product_categories.sql +64 -0
  34. package/supabase/migrations/00000000000020_add_category_translations.sql +10 -0
  35. package/supabase/migrations/00000000000021_migrate_hero_blocks_to_sections.sql +29 -0
  36. package/supabase/migrations/00000000000022_seed_cortex_ai_guide_post.sql +184 -0
  37. package/supabase/migrations/00000000000023_setup_custom_block_definitions.sql +183 -0
  38. package/supabase/migrations/00000000000024_setup_ucp_cart_sessions.sql +72 -0
  39. package/supabase/migrations/00000000000025_add_sale_schedule_columns.sql +406 -0
  40. package/supabase/migrations/00000000000026_seed_on_sale_translation.sql +9 -0
  41. package/supabase/migrations/00000000000027_setup_privacy_and_mfa.sql +479 -0
  42. package/supabase/migrations/00000000000028_clear_advisor_warnings.sql +93 -0
  43. package/supabase/migrations/00000000000029_refresh_setup_article.sql +252 -0
  44. package/supabase/templates/confirmation.html +54 -0
  45. package/supabase/templates/email_change.html +53 -0
  46. package/supabase/templates/invite.html +53 -0
  47. package/supabase/templates/magic_link.html +53 -0
  48. package/supabase/templates/reauthentication.html +45 -0
  49. package/supabase/templates/recovery.html +54 -0
  50. package/index.d.ts +0 -4
  51. package/lib/supabase/client.d.ts +0 -9
  52. package/lib/supabase/middleware.d.ts +0 -2
  53. package/lib/supabase/server.d.ts +0 -7
  54. package/lib/supabase/ssg-client.d.ts +0 -2
  55. package/lib/supabase/types.d.ts +0 -635
  56. package/server.d.ts +0 -2
  57. package/ssg-client-CiaENGEv.js +0 -1
  58. package/ssg-client-DgUYZgPq.mjs +0 -8
  59. package/supabase/migrations/00000000000000_setup_extensions_and_roles.sql +0 -54
  60. package/supabase/migrations/00000000000001_setup_site_settings.sql +0 -19
  61. package/supabase/migrations/00000000000002_setup_profiles.sql +0 -87
  62. package/supabase/migrations/00000000000003_setup_languages.sql +0 -43
  63. package/supabase/migrations/00000000000004_setup_media.sql +0 -54
  64. package/supabase/migrations/00000000000005_setup_posts.sql +0 -56
  65. package/supabase/migrations/00000000000006_setup_pages.sql +0 -51
  66. package/supabase/migrations/00000000000007_setup_blocks.sql +0 -47
  67. package/supabase/migrations/00000000000008_setup_navigation.sql +0 -51
  68. package/supabase/migrations/00000000000009_setup_logos.sql +0 -13
  69. package/supabase/migrations/00000000000010_setup_translations.sql +0 -29
  70. package/supabase/migrations/00000000000011_setup_revisions.sql +0 -38
  71. package/supabase/migrations/00000000000012_setup_rls_policies.sql +0 -239
  72. package/supabase/migrations/00000000000013_seed_data.sql +0 -149
  73. package/supabase/migrations/00000000000014_seed_homepage_blocks.sql +0 -661
  74. package/supabase/migrations/00000000000015_seed_how_it_works.sql +0 -89
  75. package/supabase/migrations/00000000000016_sandbox_setup.sql +0 -834
@@ -1,319 +1,330 @@
1
- # For detailed configuration reference documentation, visit:
2
- # https://supabase.com/docs/guides/local-development/cli/config
3
- # A string used to distinguish different Supabase projects on the same host. Defaults to the
4
- # working directory name when running `supabase init`.
5
- project_id = "env(SUPABASE_PROJECT_ID)"
6
-
7
- [api]
8
- enabled = true
9
- # Port to use for the API URL.
10
- port = 54321
11
- # Schemas to expose in your API. Tables, views and stored procedures in this schema will get API
12
- # endpoints. `public` and `graphql_public` schemas are included by default.
13
- schemas = ["public", "graphql_public"]
14
- # Extra schemas to add to the search_path of every request.
15
- extra_search_path = ["public", "extensions"]
16
- # The maximum number of rows returns from a view, table, or stored procedure. Limits payload size
17
- # for accidental or malicious requests.
18
- max_rows = 1000
19
-
20
- [api.tls]
21
- # Enable HTTPS endpoints locally using a self-signed certificate.
22
- enabled = false
23
-
24
- [db]
25
- # Port to use for the local database URL.
26
- port = 54322
27
- # Port used by db diff command to initialize the shadow database.
28
- shadow_port = 54320
29
- # The database major version to use. This has to be the same as your remote database's. Run `SHOW
30
- # server_version;` on the remote database to check.
31
- major_version = 17
32
-
33
- [db.pooler]
34
- enabled = false
35
- # Port to use for the local connection pooler.
36
- port = 54329
37
- # Specifies when a server connection can be reused by other clients.
38
- # Configure one of the supported pooler modes: `transaction`, `session`.
39
- pool_mode = "transaction"
40
- # How many server connections to allow per user/database pair.
41
- default_pool_size = 20
42
- # Maximum number of client connections allowed.
43
- max_client_conn = 100
44
-
45
- # [db.vault]
46
- # secret_key = "env(SECRET_VALUE)"
47
-
48
- [db.migrations]
49
- # Specifies an ordered list of schema files that describe your database.
50
- # Supports glob patterns relative to supabase directory: "./schemas/*.sql"
51
- schema_paths = []
52
-
53
- [db.seed]
54
- # If enabled, seeds the database after migrations during a db reset.
55
- enabled = true
56
- # Specifies an ordered list of seed files to load during db reset.
57
- # Supports glob patterns relative to supabase directory: "./seeds/*.sql"
58
- sql_paths = ["./seed.sql"]
59
-
60
- [realtime]
61
- enabled = true
62
- # Bind realtime via either IPv4 or IPv6. (default: IPv4)
63
- # ip_version = "IPv6"
64
- # The maximum length in bytes of HTTP request headers. (default: 4096)
65
- # max_header_length = 4096
66
-
67
- [studio]
68
- enabled = true
69
- # Port to use for Supabase Studio.
70
- port = 54323
71
- # External URL of the API server that frontend connects to.
72
- api_url = "http://127.0.0.1"
73
- # OpenAI API Key to use for Supabase AI in the Supabase Studio.
74
- openai_api_key = "env(OPENAI_API_KEY)"
75
-
76
- # Email testing server. Emails sent with the local dev setup are not actually sent - rather, they
77
- # are monitored, and you can view the emails that would have been sent from the web interface.
78
- [inbucket]
79
- enabled = true
80
- # Port to use for the email testing server web interface.
81
- port = 54324
82
- # Uncomment to expose additional ports for testing user applications that send emails.
83
- # smtp_port = 54325
84
- # pop3_port = 54326
85
- # admin_email = "admin@email.com"
86
- # sender_name = "Admin"
87
-
88
- [storage]
89
- enabled = true
90
- # The maximum file size allowed (e.g. "5MB", "500KB").
91
- file_size_limit = "50MiB"
92
-
93
- # Image transformation API is available to Supabase Pro plan.
94
- # [storage.image_transformation]
95
- # enabled = true
96
-
97
- # Uncomment to configure local storage buckets
98
- # [storage.buckets.images]
99
- # public = false
100
- # file_size_limit = "50MiB"
101
- # allowed_mime_types = ["image/png", "image/jpeg"]
102
- # objects_path = "./images"
103
-
104
- [auth]
105
- enabled = true
106
- # The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
107
- # in emails.
108
- site_url = "env(NEXT_PUBLIC_URL)"
109
- # A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
110
- additional_redirect_urls = []
111
- # How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
112
- jwt_expiry = 3600
113
- # If disabled, the refresh token will never expire.
114
- enable_refresh_token_rotation = true
115
- # Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
116
- # Requires enable_refresh_token_rotation = true.
117
- refresh_token_reuse_interval = 10
118
- # Allow/disallow new user signups to your project.
119
- enable_signup = true
120
- # Allow/disallow anonymous sign-ins to your project.
121
- enable_anonymous_sign_ins = false
122
- # Allow/disallow testing manual linking of accounts
123
- enable_manual_linking = false
124
- # Passwords shorter than this value will be rejected as weak. Minimum 6, recommended 8 or more.
125
- minimum_password_length = 6
126
- # Passwords that do not meet the following requirements will be rejected as weak. Supported values
127
- # are: `letters_digits`, `lower_upper_letters_digits`, `lower_upper_letters_digits_symbols`
128
- password_requirements = ""
129
-
130
- [auth.rate_limit]
131
- # Number of emails that can be sent per hour. Requires auth.email.smtp to be enabled.
132
- email_sent = 2
133
- # Number of SMS messages that can be sent per hour. Requires auth.sms to be enabled.
134
- sms_sent = 30
135
- # Number of anonymous sign-ins that can be made per hour per IP address. Requires enable_anonymous_sign_ins = true.
136
- anonymous_users = 30
137
- # Number of sessions that can be refreshed in a 5 minute interval per IP address.
138
- token_refresh = 150
139
- # Number of sign up and sign-in requests that can be made in a 5 minute interval per IP address (excludes anonymous users).
140
- sign_in_sign_ups = 30
141
- # Number of OTP / Magic link verifications that can be made in a 5 minute interval per IP address.
142
- token_verifications = 30
143
-
144
- # Configure one of the supported captcha providers: `hcaptcha`, `turnstile`.
145
- # [auth.captcha]
146
- # enabled = true
147
- # provider = "hcaptcha"
148
- # secret = ""
149
-
150
- [auth.email]
151
- # Allow/disallow new user signups via email to your project.
152
- enable_signup = true
153
- # If enabled, a user will be required to confirm any email change on both the old, and new email
154
- # addresses. If disabled, only the new email is required to confirm.
155
- double_confirm_changes = true
156
- # If enabled, users need to confirm their email address before signing in.
157
- enable_confirmations = true
158
- # If enabled, users will need to reauthenticate or have logged in recently to change their password.
159
- secure_password_change = false
160
- # Controls the minimum amount of time that must pass before sending another signup confirmation or password reset email.
161
- max_frequency = "1m0s"
162
- # Number of characters used in the email OTP.
163
- otp_length = 6
164
- # Number of seconds before the email OTP expires (defaults to 1 hour).
165
- otp_expiry = 3600
166
-
167
- # Use a production-ready SMTP server
168
- # [auth.email.smtp]
169
- # enabled = true
170
- # host = "smtp.sendgrid.net"
171
- # port = 587
172
- # user = "apikey"
173
- # pass = "env(SENDGRID_API_KEY)"
174
- # admin_email = "admin@email.com"
175
- # sender_name = "Admin"
176
-
177
- # Uncomment to customize email template
178
- # [auth.email.template.invite]
179
- # subject = "You have been invited"
180
- # content_path = "./supabase/templates/invite.html"
181
-
182
- [auth.sms]
183
- # Allow/disallow new user signups via SMS to your project.
184
- enable_signup = false
185
- # If enabled, users need to confirm their phone number before signing in.
186
- enable_confirmations = false
187
- # Template for sending OTP to users
188
- template = "Your code is {{ .Code }}"
189
- # Controls the minimum amount of time that must pass before sending another sms otp.
190
- max_frequency = "5s"
191
-
192
- # Use pre-defined map of phone number to OTP for testing.
193
- # [auth.sms.test_otp]
194
- # 4152127777 = "123456"
195
-
196
- # Configure logged in session timeouts.
197
- # [auth.sessions]
198
- # Force log out after the specified duration.
199
- # timebox = "24h"
200
- # Force log out if the user has been inactive longer than the specified duration.
201
- # inactivity_timeout = "8h"
202
-
203
- # This hook runs before a token is issued and allows you to add additional claims based on the authentication method used.
204
- # [auth.hook.custom_access_token]
205
- # enabled = true
206
- # uri = "pg-functions://<database>/<schema>/<hook_name>"
207
-
208
- # Configure one of the supported SMS providers: `twilio`, `twilio_verify`, `messagebird`, `textlocal`, `vonage`.
209
- [auth.sms.twilio]
210
- enabled = false
211
- account_sid = ""
212
- message_service_sid = ""
213
- # DO NOT commit your Twilio auth token to git. Use environment variable substitution instead:
214
- auth_token = "env(SUPABASE_AUTH_SMS_TWILIO_AUTH_TOKEN)"
215
-
216
- # Multi-factor-authentication is available to Supabase Pro plan.
217
- [auth.mfa]
218
- # Control how many MFA factors can be enrolled at once per user.
219
- max_enrolled_factors = 10
220
-
221
- # Control MFA via App Authenticator (TOTP)
222
- [auth.mfa.totp]
223
- enroll_enabled = false
224
- verify_enabled = false
225
-
226
- # Configure MFA via Phone Messaging
227
- [auth.mfa.phone]
228
- enroll_enabled = false
229
- verify_enabled = false
230
- otp_length = 6
231
- template = "Your code is {{ .Code }}"
232
- max_frequency = "5s"
233
-
234
- # Configure MFA via WebAuthn
235
- # [auth.mfa.web_authn]
236
- # enroll_enabled = true
237
- # verify_enabled = true
238
-
239
- # Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`,
240
- # `discord`, `facebook`, `github`, `gitlab`, `google`, `keycloak`, `linkedin_oidc`, `notion`, `twitch`,
241
- # `twitter`, `slack`, `spotify`, `workos`, `zoom`.
242
- [auth.external.apple]
243
- enabled = false
244
- client_id = ""
245
- # DO NOT commit your OAuth provider secret to git. Use environment variable substitution instead:
246
- secret = "env(SUPABASE_AUTH_EXTERNAL_APPLE_SECRET)"
247
- # Overrides the default auth redirectUrl.
248
- redirect_uri = ""
249
- # Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure,
250
- # or any other third-party OIDC providers.
251
- url = ""
252
- # If enabled, the nonce check will be skipped. Required for local sign in with Google auth.
253
- skip_nonce_check = false
254
-
255
- # Use Firebase Auth as a third-party provider alongside Supabase Auth.
256
- [auth.third_party.firebase]
257
- enabled = false
258
- # project_id = "my-firebase-project"
259
-
260
- # Use Auth0 as a third-party provider alongside Supabase Auth.
261
- [auth.third_party.auth0]
262
- enabled = false
263
- # tenant = "my-auth0-tenant"
264
- # tenant_region = "us"
265
-
266
- # Use AWS Cognito (Amplify) as a third-party provider alongside Supabase Auth.
267
- [auth.third_party.aws_cognito]
268
- enabled = false
269
- # user_pool_id = "my-user-pool-id"
270
- # user_pool_region = "us-east-1"
271
-
272
- # Use Clerk as a third-party provider alongside Supabase Auth.
273
- [auth.third_party.clerk]
274
- enabled = false
275
- # Obtain from https://clerk.com/setup/supabase
276
- # domain = "example.clerk.accounts.dev"
277
-
278
- [edge_runtime]
279
- enabled = true
280
- # Configure one of the supported request policies: `oneshot`, `per_worker`.
281
- # Use `oneshot` for hot reload, or `per_worker` for load testing.
282
- policy = "oneshot"
283
- # Port to attach the Chrome inspector for debugging edge functions.
284
- inspector_port = 8083
285
- # The Deno major version to use.
286
- deno_version = 1
287
-
288
- # [edge_runtime.secrets]
289
- # secret_key = "env(SECRET_VALUE)"
290
-
291
- [analytics]
292
- enabled = true
293
- port = 54327
294
- # Configure one of the supported backends: `postgres`, `bigquery`.
295
- backend = "postgres"
296
-
297
- # Experimental features may be deprecated any time
298
- [experimental]
299
- # Configures Postgres storage engine to use OrioleDB (S3)
300
- orioledb_version = ""
301
- # Configures S3 bucket URL, eg. <bucket_name>.s3-<region>.amazonaws.com
302
- s3_host = "env(S3_HOST)"
303
- # Configures S3 bucket region, eg. us-east-1
304
- s3_region = "env(S3_REGION)"
305
- # Configures AWS_ACCESS_KEY_ID for S3 bucket
306
- s3_access_key = "env(S3_ACCESS_KEY)"
307
- # Configures AWS_SECRET_ACCESS_KEY for S3 bucket
308
- s3_secret_key = "env(S3_SECRET_KEY)"
309
-
310
- [functions.on-content-change-revalidate]
311
- enabled = true
312
- verify_jwt = true
313
- import_map = "./functions/on-content-change-revalidate/deno.json"
314
- # Uncomment to specify a custom file path to the entrypoint.
315
- # Supported file extensions are: .ts, .js, .mjs, .jsx, .tsx
316
- entrypoint = "./functions/on-content-change-revalidate/index.ts"
317
- # Specifies static files to be bundled with the function. Supports glob patterns.
318
- # For example, if you want to serve static HTML pages in your function:
319
- # static_files = [ "./functions/on-content-change-revalidate/*.html" ]
1
+ # For detailed configuration reference documentation, visit:
2
+ # https://supabase.com/docs/guides/local-development/cli/config
3
+ # A string used to distinguish different Supabase projects on the same host. Defaults to the
4
+ # working directory name when running `supabase init`.
5
+ project_id = "env(SUPABASE_PROJECT_ID)"
6
+
7
+ [api]
8
+ enabled = true
9
+ # Port to use for the API URL.
10
+ port = 54321
11
+ # Schemas to expose in your API. Tables, views and stored procedures in this schema will get API
12
+ # endpoints. `public` and `graphql_public` schemas are included by default.
13
+ schemas = ["public", "graphql_public"]
14
+ # Extra schemas to add to the search_path of every request.
15
+ extra_search_path = ["public", "extensions"]
16
+ # The maximum number of rows returns from a view, table, or stored procedure. Limits payload size
17
+ # for accidental or malicious requests.
18
+ max_rows = 1000
19
+
20
+ [api.tls]
21
+ # Enable HTTPS endpoints locally using a self-signed certificate.
22
+ enabled = false
23
+
24
+ [db]
25
+ # Port to use for the local database URL.
26
+ port = 54322
27
+ # Port used by db diff command to initialize the shadow database.
28
+ shadow_port = 54320
29
+ # The database major version to use. This has to be the same as your remote database's. Run `SHOW
30
+ # server_version;` on the remote database to check.
31
+ major_version = 17
32
+
33
+ [db.pooler]
34
+ enabled = false
35
+ # Port to use for the local connection pooler.
36
+ port = 54329
37
+ # Specifies when a server connection can be reused by other clients.
38
+ # Configure one of the supported pooler modes: `transaction`, `session`.
39
+ pool_mode = "transaction"
40
+ # How many server connections to allow per user/database pair.
41
+ default_pool_size = 20
42
+ # Maximum number of client connections allowed.
43
+ max_client_conn = 100
44
+
45
+ # [db.vault]
46
+ # secret_key = "env(SECRET_VALUE)"
47
+
48
+ [db.migrations]
49
+ # Specifies an ordered list of schema files that describe your database.
50
+ # Supports glob patterns relative to supabase directory: "./schemas/*.sql"
51
+ schema_paths = []
52
+
53
+ [db.seed]
54
+ # If enabled, seeds the database after migrations during a db reset.
55
+ enabled = true
56
+ # Specifies an ordered list of seed files to load during db reset.
57
+ # Supports glob patterns relative to supabase directory: "./seeds/*.sql"
58
+ sql_paths = ["./seed.sql"]
59
+
60
+ [realtime]
61
+ enabled = true
62
+ # Bind realtime via either IPv4 or IPv6. (default: IPv4)
63
+ # ip_version = "IPv6"
64
+ # The maximum length in bytes of HTTP request headers. (default: 4096)
65
+ # max_header_length = 4096
66
+
67
+ [studio]
68
+ enabled = true
69
+ # Port to use for Supabase Studio.
70
+ port = 54323
71
+ # External URL of the API server that frontend connects to.
72
+ api_url = "http://127.0.0.1"
73
+ # OpenAI API Key to use for Supabase AI in the Supabase Studio.
74
+ openai_api_key = "env(OPENAI_API_KEY)"
75
+
76
+ # Email testing server. Emails sent with the local dev setup are not actually sent - rather, they
77
+ # are monitored, and you can view the emails that would have been sent from the web interface.
78
+ [inbucket]
79
+ enabled = true
80
+ # Port to use for the email testing server web interface.
81
+ port = 54324
82
+ # Uncomment to expose additional ports for testing user applications that send emails.
83
+ # smtp_port = 54325
84
+ # pop3_port = 54326
85
+ # admin_email = "admin@email.com"
86
+ # sender_name = "Admin"
87
+
88
+ [storage]
89
+ enabled = true
90
+ # The maximum file size allowed (e.g. "5MB", "500KB").
91
+ file_size_limit = "50MiB"
92
+
93
+ # Image transformation API is available to Supabase Pro plan.
94
+ # [storage.image_transformation]
95
+ # enabled = true
96
+
97
+ # Uncomment to configure local storage buckets
98
+ # [storage.buckets.images]
99
+ # public = false
100
+ # file_size_limit = "50MiB"
101
+ # allowed_mime_types = ["image/png", "image/jpeg"]
102
+ # objects_path = "./images"
103
+
104
+ [auth]
105
+ enabled = true
106
+ # The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
107
+ # in emails.
108
+ site_url = "env(NEXT_PUBLIC_URL)"
109
+ # A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
110
+ additional_redirect_urls = ["env(TARGET_URL)"]
111
+ # How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
112
+ jwt_expiry = 3600
113
+ # If disabled, the refresh token will never expire.
114
+ enable_refresh_token_rotation = true
115
+ # Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
116
+ # Requires enable_refresh_token_rotation = true.
117
+ refresh_token_reuse_interval = 10
118
+ # Allow/disallow new user signups to your project.
119
+ enable_signup = true
120
+ # Allow/disallow anonymous sign-ins to your project.
121
+ enable_anonymous_sign_ins = false
122
+ # Allow/disallow testing manual linking of accounts
123
+ enable_manual_linking = false
124
+ # Passwords shorter than this value will be rejected as weak. Minimum 6, recommended 8 or more.
125
+ minimum_password_length = 6
126
+ # Passwords that do not meet the following requirements will be rejected as weak. Supported values
127
+ # are: `letters_digits`, `lower_upper_letters_digits`, `lower_upper_letters_digits_symbols`
128
+ password_requirements = ""
129
+
130
+ [auth.rate_limit]
131
+ # Number of emails that can be sent per hour. Requires auth.email.smtp to be enabled.
132
+ email_sent = 30
133
+ # Number of SMS messages that can be sent per hour. Requires auth.sms to be enabled.
134
+ sms_sent = 30
135
+ # Number of anonymous sign-ins that can be made per hour per IP address. Requires enable_anonymous_sign_ins = true.
136
+ anonymous_users = 30
137
+ # Number of sessions that can be refreshed in a 5 minute interval per IP address.
138
+ token_refresh = 150
139
+ # Number of sign up and sign-in requests that can be made in a 5 minute interval per IP address (excludes anonymous users).
140
+ sign_in_sign_ups = 30
141
+ # Number of OTP / Magic link verifications that can be made in a 5 minute interval per IP address.
142
+ token_verifications = 30
143
+
144
+ # Configure one of the supported captcha providers: `hcaptcha`, `turnstile`.
145
+ # [auth.captcha]
146
+ # enabled = true
147
+ # provider = "hcaptcha"
148
+ # secret = ""
149
+
150
+ [auth.email]
151
+ # Allow/disallow new user signups via email to your project.
152
+ enable_signup = true
153
+ # If enabled, a user will be required to confirm any email change on both the old, and new email
154
+ # addresses. If disabled, only the new email is required to confirm.
155
+ double_confirm_changes = true
156
+ # If enabled, users need to confirm their email address before signing in.
157
+ enable_confirmations = true
158
+ # If enabled, users will need to reauthenticate or have logged in recently to change their password.
159
+ secure_password_change = false
160
+ # Controls the minimum amount of time that must pass before sending another signup confirmation or password reset email.
161
+ max_frequency = "1m0s"
162
+ # Number of characters used in the email OTP.
163
+ otp_length = 6
164
+ # Number of seconds before the email OTP expires (defaults to 1 hour).
165
+ otp_expiry = 3600
166
+
167
+ # Use a production-ready SMTP server.
168
+ # For hosted Supabase projects, prefer `npm run configure:supabase-auth`, which reads
169
+ # SMTP_* from your env file and pushes the settings plus branded templates automatically.
170
+ # For local/self-hosted Supabase, you can uncomment this block and keep using env() values.
171
+ [auth.email.smtp]
172
+ host = "env(SMTP_HOST)"
173
+ port = "env(SMTP_PORT)"
174
+ user = "env(SMTP_USER)"
175
+ pass = "env(SMTP_PASS)"
176
+ admin_email = "env(SMTP_FROM_EMAIL)"
177
+ sender_name = "env(SMTP_FROM_NAME)"
178
+
179
+ [auth.email.template.confirmation]
180
+ subject = "Confirm your email"
181
+ content_path = "./supabase/templates/confirmation.html"
182
+
183
+ [auth.email.template.recovery]
184
+ subject = "Reset your password"
185
+ content_path = "./supabase/templates/recovery.html"
186
+
187
+ [auth.email.template.magic_link]
188
+ subject = "Your sign-in link"
189
+ content_path = "./supabase/templates/magic_link.html"
190
+
191
+ [auth.email.template.invite]
192
+ subject = "You're invited"
193
+ content_path = "./supabase/templates/invite.html"
194
+
195
+ [auth.email.template.email_change]
196
+ subject = "Confirm your email change"
197
+ content_path = "./supabase/templates/email_change.html"
198
+
199
+ [auth.email.template.reauthentication]
200
+ subject = "Confirm it's you"
201
+ content_path = "./supabase/templates/reauthentication.html"
202
+
203
+ [auth.sms]
204
+ # Allow/disallow new user signups via SMS to your project.
205
+ enable_signup = false
206
+ # If enabled, users need to confirm their phone number before signing in.
207
+ enable_confirmations = false
208
+ # Template for sending OTP to users
209
+ template = "Your code is {{ .Code }}"
210
+ # Controls the minimum amount of time that must pass before sending another sms otp.
211
+ max_frequency = "5s"
212
+
213
+ # Use pre-defined map of phone number to OTP for testing.
214
+ # [auth.sms.test_otp]
215
+ # 4152127777 = "123456"
216
+
217
+ # Configure logged in session timeouts.
218
+ # [auth.sessions]
219
+ # Force log out after the specified duration.
220
+ # timebox = "24h"
221
+ # Force log out if the user has been inactive longer than the specified duration.
222
+ # inactivity_timeout = "8h"
223
+
224
+ # This hook runs before a token is issued and allows you to add additional claims based on the authentication method used.
225
+ # [auth.hook.custom_access_token]
226
+ # enabled = true
227
+ # uri = "pg-functions://<database>/<schema>/<hook_name>"
228
+
229
+ # Configure one of the supported SMS providers: `twilio`, `twilio_verify`, `messagebird`, `textlocal`, `vonage`.
230
+ [auth.sms.twilio]
231
+ enabled = false
232
+ account_sid = ""
233
+ message_service_sid = ""
234
+ # DO NOT commit your Twilio auth token to git. Use environment variable substitution instead:
235
+ auth_token = "env(SUPABASE_AUTH_SMS_TWILIO_AUTH_TOKEN)"
236
+
237
+ # Multi-factor-authentication is available to Supabase Pro plan.
238
+ [auth.mfa]
239
+ # Control how many MFA factors can be enrolled at once per user.
240
+ max_enrolled_factors = 10
241
+
242
+ # Control MFA via App Authenticator (TOTP)
243
+ [auth.mfa.totp]
244
+ enroll_enabled = false
245
+ verify_enabled = false
246
+
247
+ # Configure MFA via Phone Messaging
248
+ [auth.mfa.phone]
249
+ enroll_enabled = false
250
+ verify_enabled = false
251
+ otp_length = 6
252
+ template = "Your code is {{ .Code }}"
253
+ max_frequency = "5s"
254
+
255
+ # Configure MFA via WebAuthn
256
+ # [auth.mfa.web_authn]
257
+ # enroll_enabled = true
258
+ # verify_enabled = true
259
+
260
+ # Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`,
261
+ # `discord`, `facebook`, `github`, `gitlab`, `google`, `keycloak`, `linkedin_oidc`, `notion`, `twitch`,
262
+ # `twitter`, `slack`, `spotify`, `workos`, `zoom`.
263
+ [auth.external.apple]
264
+ enabled = false
265
+ client_id = ""
266
+ # DO NOT commit your OAuth provider secret to git. Use environment variable substitution instead:
267
+ secret = "env(SUPABASE_AUTH_EXTERNAL_APPLE_SECRET)"
268
+ # Overrides the default auth redirectUrl.
269
+ redirect_uri = ""
270
+ # Overrides the default auth provider URL. Used to support self-hosted gitlab, single-tenant Azure,
271
+ # or any other third-party OIDC providers.
272
+ url = ""
273
+ # If enabled, the nonce check will be skipped. Required for local sign in with Google auth.
274
+ skip_nonce_check = false
275
+
276
+ # Use Firebase Auth as a third-party provider alongside Supabase Auth.
277
+ [auth.third_party.firebase]
278
+ enabled = false
279
+ # project_id = "my-firebase-project"
280
+
281
+ # Use Auth0 as a third-party provider alongside Supabase Auth.
282
+ [auth.third_party.auth0]
283
+ enabled = false
284
+ # tenant = "my-auth0-tenant"
285
+ # tenant_region = "us"
286
+
287
+ # Use AWS Cognito (Amplify) as a third-party provider alongside Supabase Auth.
288
+ [auth.third_party.aws_cognito]
289
+ enabled = false
290
+ # user_pool_id = "my-user-pool-id"
291
+ # user_pool_region = "us-east-1"
292
+
293
+ # Use Clerk as a third-party provider alongside Supabase Auth.
294
+ [auth.third_party.clerk]
295
+ enabled = false
296
+ # Obtain from https://clerk.com/setup/supabase
297
+ # domain = "example.clerk.accounts.dev"
298
+
299
+ [edge_runtime]
300
+ enabled = true
301
+ # Configure one of the supported request policies: `oneshot`, `per_worker`.
302
+ # Use `oneshot` for hot reload, or `per_worker` for load testing.
303
+ policy = "oneshot"
304
+ # Port to attach the Chrome inspector for debugging edge functions.
305
+ inspector_port = 8083
306
+ # The Deno major version to use.
307
+ deno_version = 1
308
+
309
+ # [edge_runtime.secrets]
310
+ # secret_key = "env(SECRET_VALUE)"
311
+
312
+ [analytics]
313
+ enabled = true
314
+ port = 54327
315
+ # Configure one of the supported backends: `postgres`, `bigquery`.
316
+ backend = "postgres"
317
+
318
+ # Experimental features may be deprecated any time
319
+ [experimental]
320
+ # Configures Postgres storage engine to use OrioleDB (S3)
321
+ orioledb_version = ""
322
+ # Configures S3 bucket URL, eg. <bucket_name>.s3-<region>.amazonaws.com
323
+ s3_host = "env(S3_HOST)"
324
+ # Configures S3 bucket region, eg. us-east-1
325
+ s3_region = "env(S3_REGION)"
326
+ # Configures AWS_ACCESS_KEY_ID for S3 bucket
327
+ s3_access_key = "env(S3_ACCESS_KEY)"
328
+ # Configures AWS_SECRET_ACCESS_KEY for S3 bucket
329
+ s3_secret_key = "env(S3_SECRET_KEY)"
330
+