Hey, I have a question about the website domain wi...
# support-questions-legacy
l
Hey, I have a question about the website domain with multipe frontends. Refering to the docs:
Copy code
On the backend, you should set the websiteDomain to be your main domain (example.com if your sub domains are sub.example.com), and then you want to override the sendEmail functions to change the domain of the link dynamically based on the tenant ID supplied to the sendEmail function. See the Email Delivery section in our docs for how to override the sendEmail function.
for what is this websiteDomain used for? I have the following domain setup: a.domainA.com -> uses api.domainA.com b.domainA.com -> uses api.domainA.com so i should set websiteDomain to domainA.com. But i have another frontend: domaniB.com -> used api.domainA.com what to do now here?
l
thank you.
@rp_st according to this: I should not simply return the origin header in the get_origin. Is it safe to check if the origin is in a list of allowed domains and return the header if so or should i really do a check for each origni?
And is there a way to include a custom param like routePath which comes from the frontend to the a magic link? here is an example of my link:
Copy code
http://localhost:3001/auth/verify?rid=passwordless&preAuthSessionId=-yCBPhk_1l23pAAicdv6JHaYveG-GN3GQCEo6BDGKjE&tenantId=customers#yHUM31PPT3oT3RfOQM1LX0faTXdwJGJGzmEJM-54B0A
I need to have a possibility to redirect the user to the specific page that has requested the login.
r
yea
l
is this possible somehow?
r
yea, you can change the url by overriding the sendEmail function on the backend