diff --git a/apps/cli/src/shared/init/project-init.templates.ts b/apps/cli/src/shared/init/project-init.templates.ts index 2d4e0ef25b..6eb69bc41b 100644 --- a/apps/cli/src/shared/init/project-init.templates.ts +++ b/apps/cli/src/shared/init/project-init.templates.ts @@ -16,7 +16,7 @@ port = 54321 schemas = ["public", "graphql_public"] # Extra schemas to add to the search_path of every request. extra_search_path = ["public", "extensions"] -# The maximum number of rows returns from a view, table, or stored procedure. Limits payload size +# The maximum number of rows returned from a view, table, or stored procedure. Limits payload size # for accidental or malicious requests. max_rows = 1000 # Controls whether new tables, views, sequences and functions created in the \`public\` schema by @@ -339,11 +339,15 @@ skip_nonce_check = false # If enabled, it will allow the user to successfully authenticate when the provider does not return an email address. email_optional = false -# Allow Solana wallet holders to sign in to your project via the Sign in with Solana (SIWS, EIP-4361) standard. +# Allow Solana wallet holders to sign in to your project via the Sign in with Solana (SIWS) standard. # You can configure "web3" rate limit in the [auth.rate_limit] section and set up [auth.captcha] if self-hosting. [auth.web3.solana] enabled = false +# Allow Ethereum wallet holders to sign in to your project via the Sign in with Ethereum (SIWE, EIP-4361) standard. +# [auth.web3.ethereum] +# enabled = true + # Use Firebase Auth as a third-party provider alongside Supabase Auth. [auth.third_party.firebase] enabled = false diff --git a/apps/cli/src/shared/init/project-init.templates.unit.test.ts b/apps/cli/src/shared/init/project-init.templates.unit.test.ts index fcb288038d..afd2dbd491 100644 --- a/apps/cli/src/shared/init/project-init.templates.unit.test.ts +++ b/apps/cli/src/shared/init/project-init.templates.unit.test.ts @@ -65,6 +65,14 @@ const NATIVE_AUTO_EXPOSE_COMMENT = `# without explicit GRANTs, matching the clou # instead. Left unset, a fresh project falls back to \`true\`. # auto_expose_new_tables = true`; +/* Only the native template documents Ethereum web3, cites SIWS without EIP-4361 and fixes + the `max_rows` comment typo; the vendored scaffold is left as shipped. */ +const NATIVE_WEB3_ETHEREUM_EXAMPLE = ` +# Allow Ethereum wallet holders to sign in to your project via the Sign in with Ethereum (SIWE, EIP-4361) standard. +# [auth.web3.ethereum] +# enabled = true +`; + const renderExpectedNativeEject = renderExpectedGoEject.pipe( Effect.map((eject) => eject @@ -72,7 +80,13 @@ const renderExpectedNativeEject = renderExpectedGoEject.pipe( '# content_path = "./templates/password_changed_notification.html"', '# content_path = "./supabase/templates/password_changed_notification.html"', ) - .replace(GO_AUTO_EXPOSE_COMMENT, NATIVE_AUTO_EXPOSE_COMMENT), + .replace(GO_AUTO_EXPOSE_COMMENT, NATIVE_AUTO_EXPOSE_COMMENT) + .replace("rows returns from", "rows returned from") + .replace("(SIWS, EIP-4361)", "(SIWS)") + .replace( + "[auth.web3.solana]\nenabled = false\n", + `[auth.web3.solana]\nenabled = false\n${NATIVE_WEB3_ETHEREUM_EXAMPLE}`, + ), ), );