yukimat
05/11/2021, 9:12 AMmichaelzhuk
05/11/2021, 11:04 AMmichaelzhuk
05/11/2021, 11:06 AMSecure: true; SameSite: none
. The sIRTFrontend
one doesn't meet this requirement and (my guess) is not used by browser.michaelzhuk
05/11/2021, 11:22 AMrp
05/11/2021, 11:27 AMrp
05/11/2021, 11:28 AMmichaelzhuk
05/11/2021, 11:34 AMrp
05/11/2021, 11:35 AMmichaelzhuk
05/11/2021, 11:56 AMmichaelzhuk
05/11/2021, 11:57 AMrp
05/11/2021, 11:58 AMrp
05/11/2021, 11:58 AMmichaelzhuk
05/11/2021, 12:00 PMSameSite
is required if it's going to be used by frontend onlyrp
05/11/2021, 12:01 PMrp
05/11/2021, 12:01 PMrp
05/11/2021, 12:02 PMmichaelzhuk
05/11/2021, 12:03 PMrp
05/11/2021, 12:04 PMmichaelzhuk
05/11/2021, 12:05 PMrp
05/11/2021, 12:07 PMrp
05/11/2021, 12:07 PMrp
05/11/2021, 12:18 PMsamesite=none
at the end of the string (before the closing "). For example, if a line is ID_REFRESH_TOKEN_NAME + "=" + cookieVal + ";expires=" + expires + ";path=/";
, then change it to ID_REFRESH_TOKEN_NAME + "=" + cookieVal + ";expires=" + expires + ";path=/;samesite=none";
Lines:
- https://github.com/supertokens/supertokens-website/blob/master/lib/build/fetch.js#L1138
- https://github.com/supertokens/supertokens-website/blob/master/lib/build/fetch.js#L1141
- https://github.com/supertokens/supertokens-website/blob/master/lib/build/fetch.js#L1221
- https://github.com/supertokens/supertokens-website/blob/master/lib/build/fetch.js#L1224
- https://github.com/supertokens/supertokens-website/blob/master/lib/build/fetch.js#L1318
- https://github.com/supertokens/supertokens-website/blob/master/lib/build/fetch.js#L1321rp
05/11/2021, 12:20 PMantiCsrf
value in the backend (Session.init) to "VIA_TOKEN"
. Since you will be using an iframe.michaelzhuk
05/11/2021, 12:33 PMrp
05/11/2021, 1:03 PMrp
05/11/2021, 3:40 PMsupertokens/supertokens-auth-react#0.13
- Delete yarn.lock file, and run yarn install
. This should install new versions of supertokens-auth-react
(0.13.0) and supertokens-website
(7.1.0).
- In the frontend config, change SessionReact.init()
to SessionReact.init({ isInIframe: true })
.
- In backend config, change SessionNode.init({ cookieSameSite: "none" })
to SessionNode.init({ cookieSameSite: "none", antiCsrf: "VIA_TOKEN" })
- Try logging in via the iframe, and it should work.Healsies
05/12/2021, 4:14 AMrp
05/12/2021, 4:43 AMrp
05/12/2021, 4:44 AMrp
05/12/2021, 4:46 AM