funk101
05/06/2022, 8:37 AMEmailPasswordReactSessionReactError: No instance of EmailPassword found. Make sure to call the EmailPassword.init methodEmailPasswordEmailPasswordReactrp_st
05/06/2022, 8:38 AMrp_st
05/06/2022, 8:38 AMrp_st
05/06/2022, 8:39 AMfunk101
05/06/2022, 8:39 AMrp_st
05/06/2022, 8:39 AMrp_st
05/06/2022, 8:40 AMfunk101
05/06/2022, 8:40 AMexport const frontendConfig = () => {
  return {
    appInfo,
    recipeList: [
      EmailPasswordReact.init({
        signInAndUpFeature: {
          disableDefaultImplementation: true,
        },
        getRedirectionURL: async (context) => {
          if (context.action === "SIGN_IN_AND_UP") {
            return "/signin";
          }
        },
      }),
      SessionReact.init(),
    ],
  };
};funk101
05/06/2022, 8:40 AMrp_st
05/06/2022, 8:40 AMfunk101
05/06/2022, 8:40 AMfunk101
05/06/2022, 8:41 AMrp_st
05/06/2022, 8:41 AMfunk101
05/06/2022, 8:41 AMrp_st
05/06/2022, 8:41 AMfunk101
05/06/2022, 8:42 AMrp_st
05/06/2022, 8:42 AMfunk101
05/06/2022, 8:42 AMrp_st
05/06/2022, 8:42 AMfunk101
05/06/2022, 8:42 AMimport React from "react";
import SuperTokensReact from "supertokens-auth-react";
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());
}
function MyApp({ Component, pageProps }) {
  return <Component {...pageProps} />;
}
export default MyApp;rp_st
05/06/2022, 8:43 AMrp_st
05/06/2022, 8:43 AMSignInrp_st
05/06/2022, 8:43 AMrp_st
05/06/2022, 8:44 AMSignInfunk101
05/06/2022, 8:45 AMfunk101
05/06/2022, 8:46 AMfunk101
05/06/2022, 8:46 AMrp_st
05/06/2022, 8:46 AMrp_st
05/06/2022, 8:47 AMdynamicrp_st
05/06/2022, 8:47 AMfunk101
05/06/2022, 8:50 AMrp_st
05/06/2022, 8:50 AMrp_st
05/06/2022, 8:50 AMfunk101
05/06/2022, 8:51 AMfunk101
05/06/2022, 8:51 AMrp_st
05/06/2022, 8:54 AMimport { SignInAndUp } from "supertokens-auth-react/recipe/emailpassword";
import dynamic from 'next/dynamic'
const SignInAndUpNoSSR = dynamic(
  new Promise<any>((res) =>
    res(SignInAndUp)
  ),
  { ssr: false }
)
export default function SignIn() {
  return (
    <div>
      <SignInAndUpNoSSR />
    </div>
  );
}funk101
05/06/2022, 8:57 AMrp_st
05/06/2022, 9:02 AMfunk101
05/06/2022, 9:03 AM<SignInAndUpNoSSR>
      <div>
        <input type="email" />
      </div>
      <div>
        <input type="password" />
      </div>
      <div>
        <button>Sign In</button>
      </div>
    </SignInAndUpNoSSR>funk101
05/06/2022, 9:03 AMrp_st
05/06/2022, 9:03 AMrp_st
05/06/2022, 9:03 AMrp_st
05/06/2022, 9:04 AMfunk101
05/06/2022, 9:04 AMfunk101
05/06/2022, 9:06 AMfunk101
05/06/2022, 9:07 AMfunk101
05/06/2022, 9:08 AMrp_st
05/06/2022, 9:28 AM