If you're using sub-domains for each of your tenants as tenant1.test.com, tenant2.test.com, and so on, and you'd want users to be redirected to their specific tenant URL when they get an email to activate their account, you should use the Frontegg Hosted login method and take the following steps:
1. Add 'applicationUrl' for the tenant via an API for creating or updating a tenant with the value of the tenant's URL, for example, 'https://tenant1.test.com':
2. In the 'Activate User' email template, use the 'Redirect URL' with your [frontegg-domain]/oauth/account/activate or a custom domain instead the frontegg domain and add a dummy value for 'Success Redirect URL' or use your main application URL - www.test.com
That's it! When the user will get an activation email, after setting the password, they'll be logged in and redirected to the applicationUrl you set for the tenant!