rp
03/30/2021, 2:20 PMothiagocruz
03/30/2021, 2:20 PMjavascript
SuperTokensNode.init({
supertokens: {
connectionURI: process.env.SUPERTOKENS_DOMAIN,
apiKey: process.env.SUPERTOKENS_API_KEY,
},
appInfo: {
appName: "storefront",
apiDomain: websiteDomain,
websiteDomain,
apiBasePath,
},
recipeList: [
ThirdPartyEmailPasswordNode.init({
signUpFeature: {
handlePostSignUp: async (user, context) => {
const { id, email } = user
//isBrowser() && (await fetchApi("/api/users/create", { id, email }))
},
},
providers: [],
}),
SessionNode.init(),
],
})
othiagocruz
03/30/2021, 2:21 PMothiagocruz
03/30/2021, 2:24 PMrp
03/30/2021, 2:25 PMothiagocruz
03/30/2021, 2:25 PMothiagocruz
03/30/2021, 2:25 PMrp
03/30/2021, 2:25 PMhandlePostSignUp
othiagocruz
03/30/2021, 2:25 PMrp
03/30/2021, 2:26 PMothiagocruz
03/30/2021, 2:26 PMconst apiBasePath = "/api/auth/"
rp
03/30/2021, 2:27 PMhandlePostSignUp
, does that error go away?othiagocruz
03/30/2021, 2:30 PMothiagocruz
03/30/2021, 2:30 PMrp
03/30/2021, 2:31 PMothiagocruz
03/30/2021, 2:31 PMothiagocruz
03/30/2021, 2:33 PMothiagocruz
03/30/2021, 2:33 PMTypeError: Only absolute URLs are supported
at getNodeRequestOptions (C:\offscript\storefront\node_modules\node-fetch\lib\index.js:1305:9)
at C:\offscript\storefront\node_modules\node-fetch\lib\index.js:1410:19
at new Promise (<anonymous>)
at fetch (C:\offscript\storefront\node_modules\node-fetch\lib\index.js:1407:9)
at fetchApi (C:\offscript\storefront\.next\server\pages\_app.js:5511:21)
at Object.handlePostSignUp (C:\offscript\storefront\.next\server\pages\_app.js:7066:76)
at Recipe.<anonymous> (C:\offscript\storefront\node_modules\supertokens-node\lib\build\recipe\thirdpartyemailpassword\recipe.js:285:68)
at Generator.next (<anonymous>)
at C:\offscript\storefront\node_modules\supertokens-node\lib\build\recipe\thirdpartyemailpassword\recipe.js:30:75
at new Promise (<anonymous>)
at __awaiter (C:\offscript\storefront\node_modules\supertokens-node\lib\build\recipe\thirdpartyemailpassword\recipe.js:12:16)
at Object.handleCustomFormFieldsPostSignUp (C:\offscript\storefront\node_modules\supertokens-node\lib\build\recipe\thirdpartyemailpassword\recipe.js:284:25)
at Object.<anonymous> (C:\offscript\storefront\node_modules\supertokens-node\lib\build\recipe\emailpassword\api\signup.js:67:51)
at Generator.next (<anonymous>)
at fulfilled (C:\offscript\storefront\node_modules\supertokens-node\lib\build\recipe\emailpassword\api\signup.js:29:36)
at runMicrotasks (<anonymous>)
othiagocruz
03/30/2021, 2:33 PMrp
03/30/2021, 2:39 PMprocess.env.SUPERTOKENS_DOMAIN,
?othiagocruz
03/30/2021, 2:41 PMhttps://8cfce9e1870a11ebbcb07d0af03fd0dc-eu-west-1.aws.supertokens.io:3567
rp
03/30/2021, 2:41 PMrp
03/30/2021, 2:42 PMothiagocruz
03/30/2021, 2:42 PMrp
03/30/2021, 2:43 PMothiagocruz
03/30/2021, 2:43 PM"supertokens-node": "^4.1.3",
rp
03/30/2021, 2:47 PM//isBrowser() && (await fetchApi("/api/users/create", { id, email }))
rp
03/30/2021, 2:48 PMhandlePostSignUp
.othiagocruz
03/30/2021, 2:48 PMrp
03/30/2021, 2:48 PM