Email verification redirecting to localhost

I'm following the flutter quickstart guide:
https://supabase.com/docs/guides/with-flutter#setup-deep-links

I had auth fully working, but then I tried to update my site URL and it all broke, so I thought I undid everything but it's still not working. Here's where I am now:
My site URL is
http://localhost:3000

My additional redirect URL is io.supabase.castmeapp://login-callback/

Here's the redirect URL I'm getting:
https://magmdywarmnzoatbuesp.supabase.co/auth/v1/verify?<snipped>&type=signup&redirect_to=http://localhost:3000

The account gets verified, but I get redirected to localhost rather than getting redirected to the login callback.

Two questions:
1) What am I doing wrong, so that I can get things back into a working state?
2) How do I construct custom redirect URLs such that, if the user is on their phone, they get deep linked, but if the user is on their laptop (eg checked their email from a separate device) they go to my custom domain? Is there anything special about the format of the scheme? Can I use http/https as my scheme and construct an app link as my redirect URL? How is Supabase auth picking what link to redirect to? Is it doing a naive string match on login-callback for the host?
Learn how to use Supabase in your Flutter App.
Was this page helpful?