Issue with error redirection in case of a custom domain setup
I am building a no-code tool to build custom apps. Each app can have multiple users (email/pass based login). Each app is hosted on its own subdomain app1.domain1.com, app2.domain2.com, and so on.
When better-auth is used in a custom domain/multiple subdomain setup, the base URL is not known at build time but rather at runtime. When logging in via a social provider, let's say Google, if there is an error, the redirection is made to the baseURL defined in the context: