Skip to content

send_email hook payload site_url uses API_EXTERNAL_URL instead of GOTRUE_SITE_URL #2558

@yonatan-genai

Description

@yonatan-genai

The send_email hook payload's email_data.site_url is populated from API_EXTERNAL_URL (e.g. https://<ref>.supabase.co/auth/v1) instead of GOTRUE_SITE_URL (e.g. https://myapp.com).

The SMTP template path gets this right — {{ .SiteURL }} resolves from GOTRUE_SITE_URL. The hook path doesn't, it pulls from API_EXTERNAL_URL instead.

So if you're using the hook to build confirmation links from site_url, they point to the auth server instead of your app. The field is called site_url but it's not the site URL.

email_data.site_url in the hook payload should use GOTRUE_SITE_URL, same as {{ .SiteURL }} in the templates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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