Deleted User
05/26/2022, 2:52 PMrp_st
05/26/2022, 2:53 PMrp_st
05/26/2022, 2:53 PMDeleted User
05/26/2022, 2:55 PMDeleted User
05/26/2022, 3:02 PMrp_st
05/26/2022, 3:02 PMimpecorator
05/26/2022, 3:12 PMrp_st
05/26/2022, 3:12 PMrp_st
05/26/2022, 3:12 PMrp_st
05/26/2022, 3:13 PMimpecorator
05/26/2022, 3:14 PMrp_st
05/26/2022, 3:14 PMimpecorator
05/26/2022, 3:14 PMimpecorator
05/26/2022, 3:18 PMrp_st
05/26/2022, 3:23 PMrp_st
05/26/2022, 3:25 PMrp_st
05/26/2022, 3:25 PMimpecorator
05/26/2022, 3:27 PMDeleted User
05/30/2022, 1:43 PMrp_st
05/30/2022, 1:43 PMrobschilder
06/09/2022, 2:08 PMrp_st
06/09/2022, 2:09 PMedwinn1337
06/09/2022, 2:32 PMjs
async function setCookieToStorage(cookieString: string) {
const cookieName = cookieString.split(';')[0].split('=')[0]
const cookiesFromStorage = await Storage.get({ key: frontendCookiesKey })
rp_st
06/09/2022, 2:33 PMcookieString
?edwinn1337
06/09/2022, 2:36 PMnull
rp_st
06/09/2022, 2:37 PMedwinn1337
06/09/2022, 2:38 PMedwinn1337
06/09/2022, 2:38 PMrp_st
06/09/2022, 2:38 PMnkshah2
06/09/2022, 2:40 PMedwinn1337
06/09/2022, 2:41 PMedwinn1337
06/09/2022, 2:41 PMjs
if (typeof window !== 'undefined') {
supertokens.init({
...frontendConfig().appInfo,
cookieHandler: capacitorCookieHandler,
enableDebugLogs: process.env.APP_STAGE === 'development',
})
}
nkshah2
06/09/2022, 2:48 PMnkshah2
06/09/2022, 2:54 PMcookiesFromStorage
?edwinn1337
06/09/2022, 6:09 PMedwinn1337
06/09/2022, 6:09 PMedwinn1337
06/09/2022, 6:11 PMgetCookiesFromStorage()
is a async operation now due to capacitor/promiseedwinn1337
06/09/2022, 6:11 PMrp_st
06/09/2022, 6:12 PMnkshah2
06/10/2022, 4:05 AMrp_st
06/10/2022, 4:09 AMrp_st
06/10/2022, 4:09 AMedwinn1337
06/10/2022, 6:52 AMwindow.localStorage
but con of using window is that mobile Os periodically clears the data... and we need to persist it ๐ฆrp_st
06/10/2022, 6:52 AMedwinn1337
06/10/2022, 6:54 AMrp_st
06/10/2022, 7:01 AMnkshah2
06/10/2022, 7:04 AMedwinn1337
06/10/2022, 7:07 AMedwinn1337
06/10/2022, 7:09 AMedwinn1337
06/10/2022, 7:10 AMnkshah2
06/10/2022, 7:10 AMedwinn1337
06/10/2022, 7:10 AM