I’m using the built in authentication with supabase (similar to firebase) and I’m having an issue with how the links sent via email (EX: Confirm your account or password recovery) are working. I’m wondering if it is related to some changes in DNS settings. What is being sent:
{{ .SiteURL }}/api/auth/confirm?token_hash={{ .TokenHash }}&type=recovery&next=/settings/account#password"
**note the site URL and token both appear as expected, just using these as placeholders.
Right now the link brings me directly to:
{{ .SiteURL }}/api/auth/confirm?token_hash={{ .TokenHash }}&type=recovery&next=%2Fsettings%2Faccount%2F
Which is obviously not a valid URL. Where it should be redirecting after clicking the link is:
{{ .SiteURL }}/settings/account
after it consumes the Auth token.
This was functional before I updated some DNS settings, but I can’t figure out what changed. I am also looking into auth with supabase related issues, but thought I would ask here also. The one thing that I can think of might affect this is the fact that the website is at app.{companyName}.com
instead of just {companyName}.com
.
Everything else related to DNS settings are functioning as expected, I’ve tested redirects and other routing things and all behaviour works correctly. When I navigate directly to {{ .SiteURL }}/settings/account
in the address bar, that behaves as expected (IE redirects to sign in since there is no auth token).
Additionally, these links work locally and it is only in production that they are broken.