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
05/20/2022, 2:03 PMany
)p6l.richard
05/20/2022, 2:15 PMrp
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 should we pass input.res to the updateHeaders rather than session
?res
rp
05/20/2022, 2:20 PMp6l.richard
05/20/2022, 2:20 PMrp
05/20/2022, 2:20 PMp6l.richard
05/20/2022, 2:25 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
05/20/2022, 2:34 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
05/20/2022, 4:32 PMp6l.richard
05/20/2022, 5:07 PMrp
05/20/2022, 5:08 PMp6l.richard
05/20/2022, 5:09 PMwith-localstorage
example work on nextjsrp
05/20/2022, 5:09 PMp6l.richard
05/20/2022, 5:10 PMrp
05/20/2022, 5:11 PM