kubessandra
11/06/2022, 2:33 PMrp_st
11/06/2022, 2:36 PMrp_st
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_st
11/06/2022, 4:55 PMkubessandra
11/06/2022, 7:24 PMkubessandra
11/06/2022, 7:24 PMkubessandra
11/06/2022, 7:52 PMkubessandra
11/06/2022, 8:31 PMnkshah2
11/07/2022, 1:49 AMrp_st
11/07/2022, 4:48 AMrp_st
11/07/2022, 4:48 AMrp_st
11/07/2022, 4:49 AMnkshah2
11/07/2022, 4:54 AMnkshah2
11/07/2022, 5:16 AMkubessandra
11/07/2022, 11:06 AMkubessandra
11/07/2022, 12:39 PMkubessandra
11/07/2022, 12:39 PMkubessandra
11/07/2022, 1:06 PMjs
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',
}),
// ----
kubessandra
11/07/2022, 1:08 PMjs
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))
}
}
kubessandra
11/07/2022, 1:17 PMrp_st
11/07/2022, 1:34 PMcookieDomain: '.192.168.1.33:3000',
from the backend session.init?rp_st
11/07/2022, 1:34 PMSession.init()
kubessandra
11/07/2022, 2:03 PMkubessandra
11/07/2022, 2:03 PMrp_st
11/07/2022, 2:03 PM.mydomain.com
kubessandra
11/07/2022, 2:04 PMrp_st
11/07/2022, 2:04 PMkubessandra
11/07/2022, 2:05 PMrp_st
11/07/2022, 2:05 PMkubessandra
11/07/2022, 2:06 PMallowSubdomain
taking the Host automatically and forwarding it to the Cookie domainrp_st
11/07/2022, 2:06 PMrp_st
11/07/2022, 2:06 PMrp_st
11/07/2022, 2:07 PMkubessandra
11/07/2022, 2:08 PMallowSubdomain
thing and see
Thank for the quick response and help on thiskubessandra
11/07/2022, 2:14 PM