[Manicraft1001]
05/05/2022, 6:26 PMΛ C Ξ L X R D
05/05/2022, 8:55 PMrp
05/06/2022, 4:27 AMmogalmahesh
05/06/2022, 2:06 PMITEnthusiasm
05/06/2022, 5:15 PM/auth/signout
. Getting unauthorized errors. How exactly does that happen? 🤔rp
05/06/2022, 7:03 PMexecreate
05/07/2022, 5:47 AMpython
CSRF_TRUSTED_ORIGINS=[domain_names]
CSRF_COOKIE_SECURE = True
The issue we are getting is that POST requests we are getting this response:
json
{
"detail": "CSRF Failed: CSRF token missing."
}
funk101
05/07/2022, 1:21 PMPOST http://localhost:3000/api/auth/signup 400 (Bad Request)
funk101
05/07/2022, 1:22 PMrecipeList: [
EmailPasswordNode.init({
signUpFeature: {
formFields: [
{
id: "firstname",
},
{
id: "lastname",
},
],
},
override: {
apis: (originalImplementation) => {
return {
...originalImplementation,
signUpPOST: async function (input) {
if (originalImplementation.signUpPOST === undefined) {
throw Error("Shouldn't come here");
}
try {
const response = await originalImplementation.signUpPOST(
input
);
console.log("Response: ", response);
if (response.status === "OK") {
const formFields = input.formFields;
console.log("FormFields: ", formFields);
}
} catch (err) {
console.log("Error: ", err.message);
}
return response;
},
};
},
},
}),
SessionNode.init(),
],
isInServerlessEnv: true,
rp
05/08/2022, 4:43 AMnadilas
05/08/2022, 12:35 PMexport interface ThirdPartySignInUpPOSTInput {
provider: TypeProvider;
code: string;
redirectURI: string;
authCodeResponse?: any;
clientId?: string;
options: ThirdPartyAPIOptions;
userContext: any;
}
rp
05/08/2022, 12:48 PMnadilas
05/08/2022, 1:20 PMnadilas
05/08/2022, 1:21 PMRoobyx
05/08/2022, 1:51 PMJoelC
05/08/2022, 4:20 PMshorthair_[]
05/09/2022, 5:33 PMshorthair_[]
05/09/2022, 5:33 PMshorthair_[]
05/09/2022, 5:34 PMshorthair_[]
05/09/2022, 5:34 PMshorthair_[]
05/09/2022, 5:36 PMcodingtomato
05/10/2022, 10:07 AMjj_
05/11/2022, 11:04 AMjj_
05/11/2022, 11:05 AMjj_
05/11/2022, 11:05 AMsolminded
05/11/2022, 1:58 PM/api/auth/user/password/reset/token
and at the backend I get user
and passwordResetURLWithToken
params and I can customize the email, so far so good. What I would like to do here is pass additional info to backend createAndSendCustomEmail
method so that I can generate deep links according to users OS etc and send the email correctly. If I pass additional info in the formFields
obj I get the 'Are you sending too many / too few formFields ' 400 error. I would appreciate any pointers. Thanks.Romain
05/11/2022, 3:03 PMgetRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
if (context.redirectToPath !== undefined) {
// we are navigating back to where the user was before they authenticated
return context.redirectToPath;
}
return "/dashboard";
}
return undefined;
}
but I don't see how to pass the redirectToPath
to get it here
Thanks for your help 🙂FrAgOrDiE
05/11/2022, 3:05 PMfunk101
05/11/2022, 3:59 PM