showtim33
12/13/2022, 8:19 AMrp_st
12/13/2022, 8:32 AMshowtim33
12/13/2022, 8:33 AMshowtim33
12/13/2022, 8:33 AMshowtim33
12/13/2022, 8:33 AMrp_st
12/13/2022, 8:33 AMshowtim33
12/13/2022, 8:35 AMcreateCodePOST: async (input:
{ userContext: { request: any; }; options: { req: { original: any; }; }; }) => {
// eslint-disable-next-line no-param-reassign
if(newUser) {
//do some logic
// login the user/create session automatically.
}
return originalImplementation.createCodePOST(input);
},
showtim33
12/13/2022, 8:35 AMrp_st
12/13/2022, 8:42 AMgetUserByEmail
. If that returns undefined, it means the user deos not exist.showtim33
12/13/2022, 8:43 AMrp_st
12/13/2022, 8:44 AMawait Session.createNewSession
function with the user's ID and the response object. You can return some fake API response which conforms with the return type of the functionshowtim33
12/13/2022, 8:45 AMrp_st
12/13/2022, 8:46 AMshowtim33
12/13/2022, 1:41 PMshowtim33
12/13/2022, 1:41 PMrp_st
12/13/2022, 1:42 PMinput.options.res