Skip to content

Inconsistent content_path resolution between auth.email.template and auth.email.notification #5124

@hizzuu

Description

@hizzuu

Bug report

Describe the bug

content_path in config.toml resolves differently between [auth.email.template.*] and [auth.email.notification.*].

For auth.email.template.*, the path is resolved from the project root (where you run the CLI).
For auth.email.notification.*, the path is resolved from the supabase/ directory (where config.toml lives).

This means you need to use different path conventions for template vs notification in the same config file, which is confusing and undocumented.

To Reproduce

Directory structure:

project-root/
├── supabase/
│   ├── config.toml
│   └── templates/
│       ├── confirmation.html
│       └── password_changed.html

config.toml:

# This works for template:
[auth.email.template.confirmation]
subject = "Confirm"
content_path = "supabase/templates/confirmation.html"

# This FAILS for notification (resolves to supabase/supabase/templates/...):
[auth.email.notification.password_changed]
enabled = true
subject = "Password changed"
content_path = "supabase/templates/password_changed.html"

# This works for notification:
[auth.email.notification.password_changed]
enabled = true
subject = "Password changed"
content_path = "templates/password_changed.html"

Run supabase config push from project root.

Expected behavior

Both auth.email.template.* and auth.email.notification.* should resolve content_path from the same base directory.

Environment

  • CLI version: 2.75.0 (also reproduced on latest via GitHub Actions)
  • OS: macOS / Ubuntu (GitHub Actions)

Additional context

Verified by running supabase config push locally and in CI. The workaround is to use different path conventions for template (supabase/templates/...) vs notification (templates/...), but this is inconsistent and error-prone.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions