, which is the API backend for our websites, and 2 websites
alpha.example.com
and
beta.example.com
. Each website is logging in users using
auth-api.example.com
as the backend.
I am confused about what the value of
websiteDomain
needs to be for
auth-api.example.com
. Should it be
https://example.com
?
r
rp_st
09/21/2023, 2:34 PM
hey @umarfkhawaja
rp_st
09/21/2023, 2:35 PM
the websiteDomain can just be
https://example.com
. You would need to override the sendEmail function of the recipes (in the emailDelivery config of the recipe) to change the domain on the fly based on the req object's origin header.
u
umarfkhawaja
09/21/2023, 4:06 PM
I see
umarfkhawaja
09/21/2023, 4:06 PM
okay
umarfkhawaja
09/21/2023, 4:06 PM
thanks @rp_st
umarfkhawaja
09/21/2023, 4:06 PM
does it affect CORS or the auth cookies?
r
rp_st
09/21/2023, 4:32 PM
Yup. You will have to configure cors to allow both the domains.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).