zafer7929
02/13/2024, 2:41 PMsupertokens-auth-react
), and i'm using my custom UI (supertokens-web-js
)
How can i accomplish sharing session across domains with the custom UI?
Thank youzafer7929
02/13/2024, 2:50 PMsupertokens-web-js/recipe/session
, I tried to add this,
js
Session.init({
sessionTokenFrontendDomain: ".mydomain.localdev"
})
And i was logging the user in at mydomain.localdev
and then redirecting to tenantId.mydomain.localdev
but supertokens was returning 401 unauthorised, meaning the user is not logged in.rp_st
02/13/2024, 3:38 PMzafer7929
02/13/2024, 6:25 PMrp_st
02/13/2024, 6:50 PMburnittotheground
02/13/2024, 8:09 PMburnittotheground
02/13/2024, 8:14 PMsupertokens-web-js/recipe/session
And in the doc it says;
By default, our web SDKs use cookies to provide credentials.
So we must be using cookies because we didn't configure anything to be otherwise.rp_st
02/14/2024, 3:24 AMrp_st
02/14/2024, 3:24 AMzafer7929
02/14/2024, 7:05 AMmydomain.localdev
, everything comes up without any problems. then when I redirect to tenantId.mydomain.localdev
, these logs come to this output.rp_st
02/14/2024, 7:06 AMzafer7929
02/14/2024, 7:11 AMzafer7929
02/14/2024, 7:28 AMrp_st
02/14/2024, 7:39 AMzafer7929
02/14/2024, 7:57 AMrp_st
02/14/2024, 7:57 AMburnittotheground
02/14/2024, 8:07 AMburnittotheground
02/14/2024, 8:07 AMrp_st
02/14/2024, 8:07 AMburnittotheground
02/14/2024, 8:08 AMburnittotheground
02/14/2024, 8:08 AMrp_st
02/14/2024, 8:08 AMrp_st
02/14/2024, 8:08 AMzafer7929
02/14/2024, 8:37 AMzafer.mydomain.localdev.har
file is the failed API call, whereas the mydomain.localdev.har
file is the har file of the sign in method.rp_st
02/14/2024, 8:40 AMzafer7929
02/14/2024, 8:45 AMzafer7929
02/14/2024, 8:49 AMrp_st
02/14/2024, 8:54 AM.mydomain.localdev
on the backend. Logout and login againzafer7929
02/14/2024, 9:42 AMcookieDomain := ".mydomain.localdev"
variable and included it in session.init.
After logging in, I started to get 401 unauthorised error when I was at mydomain.localdev
without subdomain. Then the session deletes itself and I am redirected to the login page.
I also sent the har files if you want to review themrp_st
02/14/2024, 10:43 AMmydomain.localdev
and not .mydomain.localdev
rp_st
02/14/2024, 10:44 AMzafer7929
02/14/2024, 12:06 PMrp_st
02/14/2024, 2:01 PM.mydomain.localdev
zafer7929
02/14/2024, 2:42 PM.mydomain.localdev
. However, the value of cookiedomain comes as mydomain.localdev
, and I don't know why it's happening."zafer7929
02/14/2024, 2:55 PMzafer7929
02/14/2024, 3:08 PMzafer7929
02/14/2024, 3:08 PMrp_st
02/14/2024, 3:33 PMzafer7929
02/15/2024, 1:07 PM