nadilas
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 PMfunk101
05/11/2022, 4:51 PMfunk101
05/11/2022, 4:51 PMimport React from "react";
import dynamic from "next/dynamic";
import SuperTokensReact from "supertokens-auth-react";
import EmailPassword from "supertokens-auth-react/recipe/emailpassword";
import { frontendConfig } from "../config/frontendConfig";
if (typeof window !== "undefined") {
// we only want to call this init function on the frontend, so we check typeof window !== 'undefined'
SuperTokensReact.init(frontendConfig());
}
const EmailPasswordAuthNoSSR = dynamic(
new Promise((res) => res(EmailPassword.EmailPasswordAuth)),
{ ssr: false }
);
function MyApp({ Component, pageProps }) {
return (
<EmailPasswordAuthNoSSR>
<Component {...pageProps} />;
</EmailPasswordAuthNoSSR>
);
}
export default MyApp;
TH
05/11/2022, 6:53 PMTH
05/11/2022, 6:55 PMfunk101
05/12/2022, 4:23 AMfunk101
05/12/2022, 4:24 AMEmailPasswordSignIn_Override: ({ DefaultComponent, ...props }) => {
return (
<Layout
pageTitle="SignIn/Register"
contentTitle="SignIn/Register"
metaDescription="Meta description here"
canonical="/auth"
>
<SingleColumnLayout>
<DefaultComponent {...props} />
</SingleColumnLayout>
</Layout>
);
},
funk101
05/12/2022, 4:24 AMfunk101
05/12/2022, 4:24 AMrp
05/12/2022, 4:26 AMfunk101
05/12/2022, 4:27 AMfunk101
05/12/2022, 4:28 AMrp
05/12/2022, 4:28 AMrp
05/12/2022, 4:29 AMrp
05/12/2022, 4:29 AM