gusfune
05/01/2021, 2:35 PMrp
05/02/2021, 3:37 PMgusfune
05/02/2021, 4:13 PMrp
05/03/2021, 2:29 PMrp
05/03/2021, 2:45 PMankitjey
05/03/2021, 2:55 PMankitjey
05/03/2021, 2:56 PMgusfune
05/03/2021, 2:57 PMuser
05/03/2021, 3:16 PMuser
Lambda function.
app.get("/user", Session.verifySession(), async (req, res) => {
let session = req.session;
res.send({
sessionHandle: session.getHandle(),
userId: session.getUserId(),
jwtPayload: session.getJWTPayload()
});
});
where the business logic is intended to go - before or after the res.send
?rp
05/03/2021, 3:43 PMres.send
sends a response to the client. Also, this is an example API that does session verification. You don't actually need this API.rp
05/03/2021, 6:39 PMimport { SessionContainer } from "supertokens-node/recipe/session";
import { Response, Request } from "express";
app.post("...", Session.verifySession(), (req: Request & {session: SessionContainer} , res: Response) => {
let session = req.session;
})
user
05/04/2021, 7:25 AMsupertokens.init(getBackendConfig());
at the top so the caller could be auth-ed.
but does every regular function also has to be wrapped in Express? and have the CORS part?rp
05/04/2021, 7:27 AMrp
05/04/2021, 7:28 AMuser
05/04/2021, 7:30 AMuser
05/04/2021, 7:32 AMrp
05/04/2021, 7:32 AMrp
05/04/2021, 7:33 AMbrian.tanseng
05/05/2021, 3:56 AMrp
05/05/2021, 5:06 AMbrian.tanseng
05/05/2021, 5:56 AMrp
05/05/2021, 5:58 AMdeltasoneca
05/05/2021, 1:17 PMhandlePostSignUp
.
I am handling the sign up event in the backend, following this doc: https://supertokens.io/docs/thirdpartyemailpassword/common-customizations/handling-signup-success#3-handling-sign-up-event-on-the-backend
The handlePostSignUp
is working fine for email+password signups btw, but it is not even being triggered when using Github to sign up. Any ideas what's wrong?rp
05/05/2021, 1:18 PMrp
05/05/2021, 1:19 PMdeltasoneca
05/05/2021, 1:20 PM"supertokens-auth-react": "^0.8.0",
"supertokens-node": "^4.2.0"
rp
05/05/2021, 1:21 PMhandlePostSignUp
is not being called right?deltasoneca
05/05/2021, 1:21 PMrp
05/05/2021, 1:21 PMrp
05/05/2021, 1:28 PMhandlePostSignIn
method: https://supertokens.io/docs/thirdpartyemailpassword/common-customizations/handling-signin-success#handlepostsignin