You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/quickstart/backend-setup.mdx
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,18 @@ The init call will include [configuration details](/docs/references/backend-sdks
110
110
</BackendTabs.TabItem>
111
111
</BackendTabs>
112
112
113
+
114
+
:::info Multiple frontend domains
115
+
To handle clients from different domains with the same SuperTokens instance, use the `origin` property in the `appInfo` object instead of `websiteDomain`.
116
+
The property accepts a function that receives the original request as an input and should return a valid domain.
117
+
Make sure to whitelist all the domains during CORS configuration.
118
+
119
+
Keep in mind that with this setup, each frontend application will not share authentication sessions.
120
+
Users will have to authenticate separately for each domain.
121
+
To configure a shared authentication experiece between multiple services check the [Unified Login](/docs/authentication/unified-login/introduction) documentation.
122
+
:::
123
+
124
+
113
125
## 3. Add the SuperTokens APIs and Configure CORS
114
126
115
127
Now that the SDK is initialized you need to expose the endpoints that will be used by the frontend SDKs.
0 commit comments