Kubessandra
11/06/2022, 2:33 PMrp
11/06/2022, 2:36 PMnkshah2
11/06/2022, 2:37 PMKubessandra
11/06/2022, 2:44 PMjs
import SuperTokens from 'supertokens-react-native';
const init = () => {
SuperTokens.init({
apiDomain: 'http://192.168.1.33:3000',
apiBasePath: '/api/auth',
});
};
export { init };
nkshah2
11/06/2022, 2:45 PMrp
11/06/2022, 4:55 PMKubessandra
11/06/2022, 7:24 PMnkshah2
11/07/2022, 1:49 AMrp
11/07/2022, 4:48 AMnkshah2
11/07/2022, 4:54 AMKubessandra
11/07/2022, 11:06 AMjs
const appInfo = {
appName: 'burdo',
apiDomain: 'http://192.168.1.33:3000',
websiteDomain: 'http://localhost:3000',
apiBasePath: '/api/auth',
websiteBasePath: '/auth',
}
js
// ----
SessionNode.init({
cookieDomain: '.192.168.1.33:3000',
}),
// ----
js
export const initSuperToken = () => {
if (typeof window !== 'undefined') {
// we only want to call this init function on the frontend, so we check typeof window !== 'undefined'
const appInfo = {
appName: 'burdo',
apiDomain: window.location.origin,
websiteDomain: window.location.origin,
apiBasePath: '/api/auth',
websiteBasePath: '/auth',
}
console.log('initSuperToken', appInfo)
SuperTokensReact.init(frontendConfig(appInfo))
}
}
rp
11/07/2022, 1:34 PMcookieDomain: '.192.168.1.33:3000',
from the backend session.init?Session.init()
Kubessandra
11/07/2022, 2:03 PMrp
11/07/2022, 2:03 PM.mydomain.com
Kubessandra
11/07/2022, 2:04 PMrp
11/07/2022, 2:04 PMKubessandra
11/07/2022, 2:05 PMrp
11/07/2022, 2:05 PMKubessandra
11/07/2022, 2:06 PMallowSubdomain
taking the Host automatically and forwarding it to the Cookie domainrp
11/07/2022, 2:06 PMKubessandra
11/07/2022, 2:08 PMallowSubdomain
thing and see
Thank for the quick response and help on this