p6l.richard
05/20/2022, 12:34 PMNextApiRequest
and express' Request
types match?
I see that in the nextjs example basically works with supertoken's express adapter and imports the import { middleware } from 'supertokens-node/framework/express';
which TypeScript doesn't like.
https://github.com/supertokens/next.js/blob/canary/examples/with-supertokens/pages/api/auth/%5B%5B...path%5D%5D.jsrp_st
05/20/2022, 2:03 PMrp_st
05/20/2022, 2:03 PMany
)p6l.richard
05/20/2022, 2:15 PMp6l.richard
05/20/2022, 2:16 PMrp_st
05/20/2022, 2:17 PMp6l.richard
05/20/2022, 2:19 PMwith-localstorage
also has some types off
https://github.com/supertokens/supertokens-auth-react/blob/master/examples/with-localstorage/api-server.js
@rp_st should we pass input.res to the updateHeaders rather than session
?p6l.richard
05/20/2022, 2:19 PMres
rp_st
05/20/2022, 2:20 PMp6l.richard
05/20/2022, 2:20 PMrp_st
05/20/2022, 2:20 PMp6l.richard
05/20/2022, 2:25 PMp6l.richard
05/20/2022, 2:33 PMSession.APIInterface.signOutPOST
be undefined?
And morte importantly, how am I supposed to handle it if it is undefined
? throw an error or return undefined
?rp_st
05/20/2022, 2:34 PMp6l.richard
05/20/2022, 2:34 PMrp_st
05/20/2022, 2:35 PMrp_st
05/20/2022, 2:35 PMp6l.richard
05/20/2022, 3:14 PM{status: "OK"}
)
If I get the implementation working, I can add it to the above PR by fixing the example. 😅rp_st
05/20/2022, 4:32 PMrp_st
05/20/2022, 4:33 PMp6l.richard
05/20/2022, 5:07 PMrp_st
05/20/2022, 5:08 PMp6l.richard
05/20/2022, 5:09 PMwith-localstorage
example work on nextjsp6l.richard
05/20/2022, 5:09 PMrp_st
05/20/2022, 5:09 PMp6l.richard
05/20/2022, 5:10 PMrp_st
05/20/2022, 5:11 PMrp_st
05/20/2022, 5:12 PM