Multiple values for WebsiteDomain
# support-questions
m
Hi All, we have a staging environment and would like to be able to test it using both the staging frontend, locally deployed frontends (localhost). For this, we require multiple values in WebsiteDomain in the supertokens config. Otherwise, we need to redeploy every time to test something. Is this possible, or is there any sort of workaround? Example config:
Copy code
AppInfo: supertokens.AppInfo{
            AppName:         "Netmaker-Account-Manager",
            APIDomain:       "https://api.staging.accounts.netmaker.io",
            WebsiteDomain:   conf.GetFrontendURL(),
            APIBasePath:     &apiBasePath,
            WebsiteBasePath: &websiteBasePath,
        },
Adding @Abhishek_ for visibility
r
hey @meshguy. Do the following: - on the backend, set the websiteDomain to any one of those values. On the frontend, set the websiteDomain to
window.location.origin
- on the backend, set the cookieSameSite setting in session.init to
"none"
- depending on which recipes you are using, override the
sendEmail
functions in the recipe to dynamically change the domain of the link in the email to point to the request's origin.
4 Views