mnky_js
04/11/2024, 6:50 AMmnky_js
04/11/2024, 6:50 AMrp_st
04/11/2024, 7:19 AMrankala
04/11/2024, 7:20 AMmnky_js
04/11/2024, 7:29 AMtypescript
exposeAccessTokenToFrontendInCookieBasedAuth: true,
// For the apps we want to use header-based sessions: https://supertokens.com/docs/thirdparty/common-customizations/sessions/token-transfer-method
getTokenTransferMethod: () => 'any',
Frontend:
typescript
tokenTransferMethod: 'header',
But now we get a
json
{
"message": "unauthorised"
}
back from the apirp_st
04/11/2024, 7:30 AMgetTokenTransferMethod: () => 'any',
from the backend?mnky_js
04/11/2024, 7:30 AMrp_st
04/11/2024, 7:30 AMmnky_js
04/11/2024, 7:31 AMrp_st
04/11/2024, 7:31 AMmnky_js
04/11/2024, 7:31 AMmnky_js
04/11/2024, 7:31 AMrp_st
04/11/2024, 7:32 AMrp_st
04/11/2024, 7:32 AMmnky_js
04/11/2024, 7:32 AMrp_st
04/11/2024, 7:33 AMrp_st
04/11/2024, 7:33 AMrankala
04/11/2024, 7:35 AMrp_st
04/11/2024, 7:35 AMmnky_js
04/11/2024, 7:38 AMtypescript
import SuperTokens from 'supertokens-web-js';
import EmailPassword from 'supertokens-web-js/recipe/emailpassword';
import Session from 'supertokens-web-js/recipe/session';
SuperTokens.init({
appInfo: {
apiDomain: 'http://localhost:3000',
apiBasePath: '/api/auth',
appName: 'blubb',
},
recipeList: [Session.init({
tokenTransferMethod: 'header',
autoAddCredentials: true
}), EmailPassword.init()],
});
rp_st
04/11/2024, 7:39 AMautoAddCredentials: true
?rp_st
04/11/2024, 7:39 AMrp_st
04/11/2024, 7:39 AMrp_st
04/11/2024, 7:40 AMrp_st
04/11/2024, 7:40 AMrp_st
04/11/2024, 7:41 AMrp_st
04/11/2024, 7:41 AMmnky_js
04/11/2024, 7:42 AMrp_st
04/11/2024, 7:43 AMmnky_js
04/11/2024, 8:31 AMmnky_js
04/11/2024, 8:31 AMrp_st
04/11/2024, 8:32 AMrankala
04/11/2024, 8:36 AMjson
{
"plugins": {
"CapacitorCookies": {
"enabled": true
}
}
}
the other thing with another stoarge is not needed. also the capacitor doc says, Thirdparty cokies need to be registered via domain; thats also not needed. 👍