leandergan
03/23/2023, 9:32 AMnkshah2
03/23/2023, 9:37 AM/createsession
) sending the JWTnkshah2
03/23/2023, 9:38 AMnkshah2
03/23/2023, 9:38 AMleandergan
03/23/2023, 9:39 AMnkshah2
03/23/2023, 9:40 AMleandergan
03/23/2023, 9:41 AMnkshah2
03/23/2023, 9:42 AMleandergan
03/23/2023, 9:43 AMnkshah2
03/23/2023, 9:44 AMleandergan
03/23/2023, 9:45 AMleandergan
03/23/2023, 9:45 AMnkshah2
03/23/2023, 9:50 AM{
shouldShowWebview && <Webview />
}
And toggle shouldShowWebview
to false once the login process is completenkshah2
03/23/2023, 9:51 AMleandergan
03/23/2023, 9:51 AMnkshah2
03/23/2023, 9:51 AMleandergan
03/27/2023, 10:24 AM/createsession
to solve this double session "problem", would it be fine to do smth like:`window.postMessage(session)` to send the needed data to react native to "reuse" the existing session instead of creating a "dead" sessions on each login? i havent seen any suggestion that a session is locked to either cookie or header type when created.
(don't know if there are any security issues with sending the session in a postMessage
tho)
i haven't tested this out yet, but am guessing after the first request where i have to add stuff manually to the request, the following request will do it automatically for me since the supertokens interceptor for axios will catch the session from the first returned response?
feel like this could potentially be a cleaner implementation and would not require the use of jwt's.
i'm no auth expert, but would be interested in any feedback on this approach from someone who knows a bit more.nkshah2
03/27/2023, 11:22 AMsharedCookiesEnabled={true}
to the webview instance (if you are using react-native-webview). That is supposed to make the webview share cookies with nativenkshah2
03/27/2023, 11:22 AMleandergan
03/27/2023, 12:14 PMsharedCookiesEnabled
is only for IOS, so since i'm mostly using android studio in dev where this is set to true
by default, it should have worked when testing earlier?nkshah2
03/27/2023, 12:19 PMleandergan
03/27/2023, 12:20 PMnkshah2
03/27/2023, 12:21 PM