# Supabase Configuration

[api]
enabled = true
port = 54321
schemas = ["public", "storage", "graphql_public"]
extra_search_path = ["public", "extensions"]
max_rows = 1000

[db]
port = 54322
major_version = 15

[studio]
enabled = true
port = 54323

[storage]
enabled = true
file_size_limit = "50MiB"

[auth]
enabled = true
# The base URL of your website. Used as an allow-list for redirects and for constructing URLs used
# in emails.
site_url = "http://localhost:5173"
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
additional_redirect_urls = ["http://localhost:3000"]
# How long tokens are valid for, in seconds. Defaults to 3600 (1 hour), maximum 604,800 (1 week).
jwt_expiry = 3600
# If disabled, the refresh token will never expire.
enable_refresh_token_rotation = true
# Allows refresh tokens to be reused after expiry, up to the specified interval in seconds.
# Requires enable_refresh_token_rotation = true.
refresh_token_reuse_interval = 10
# Allow/disallow new user signups to your project.
enable_signup = true
# Allow/disallow anonymous sign-ins to your project.
enable_anonymous_sign_ins = false
# Allow/disallow testing manual linking of accounts
enable_manual_linking = false
# Passwords shorter than this value will be rejected as weak. Minimum 6, recommended 8 or more.
minimum_password_length = 6
# Passwords that do not meet the following requirements will be rejected as weak. Supported values
# are: `letters_digits`, `lower_upper_letters_digits`, `lower_upper_letters_digits_symbols`
password_requirements = ""

[auth.email]
# Allow/disallow new user signups via email to your project.
enable_signup = true
# If enabled, a user will be required to confirm any email change on both the old, and new email
# addresses. If disabled, only the new email is required to confirm.
double_confirm_changes = true
# If enabled, users need to confirm their email address before signing in.
enable_confirmations = false
# If enabled, users will need to reauthenticate or have logged in recently to change their password.
secure_password_change = false
# Controls the minimum amount of time that must pass before sending another signup confirmation or password reset email.
max_frequency = "1s"
# Number of characters used in the email OTP.
otp_length = 6
# Number of seconds before the email OTP expires (defaults to 1 hour).
otp_expiry = 3600

[auth.email.template.invite]
subject = "You have been invited to RealTimeX Alchemy"
content_path = "supabase/templates/invite.html"

[auth.email.template.confirmation]
subject = "Confirm your RealTimeX Alchemy account"
content_path = "supabase/templates/confirmation.html"

[auth.email.template.recovery]
subject = "Reset your RealTimeX Alchemy password"
content_path = "supabase/templates/recovery.html"

[auth.email.template.magic_link]
subject = "Login to RealTimeX Alchemy"
content_path = "supabase/templates/magic-link.html"

[auth.email.template.email_change]
subject = "Confirm your new email for RealTimeX Alchemy"
content_path = "supabase/templates/email-change.html"

[functions]
# Required environment variables for Edge Functions
# These should be set in Supabase Dashboard > Project Settings > Edge Functions
#
# TOKEN_ENCRYPTION_KEY - 32-character encryption key for OAuth tokens
# GMAIL_CLIENT_ID - Gmail OAuth Client ID
# GMAIL_CLIENT_SECRET - Gmail OAuth Client Secret
# GMAIL_REDIRECT_URI - Gmail OAuth Redirect URI (default: urn:ietf:wg:oauth:2.0:oob)
# MS_GRAPH_CLIENT_ID - Microsoft Graph Client ID
# MS_GRAPH_CLIENT_SECRET - Microsoft Graph Client Secret (optional)
# MS_GRAPH_TENANT_ID - Microsoft Tenant ID (default: common)
