• r

    rp

    1 year ago
    Actually. That may not be the reason. Can I see the init code once again?
  • othiagocruz

    othiagocruz

    1 year ago
    if (typeof window !== "undefined") {
      SuperTokensReact.init({
        useReactRouterDom: false,
        appInfo: {
          appName: "storefront",
          websiteDomain,
          apiDomain: websiteDomain,
          apiBasePath,
        },
        recipeList: [
          ThirdPartyEmailPasswordReact.init({
            emailVerificationFeature: {
              mode: "REQUIRED",
            },
          }),
          SessionReact.init(),
        ],
      })
    } else if (process.env.SUPERTOKENS_DOMAIN) {
      SuperTokensNode.init({
        supertokens: {
          connectionURI: process.env.SUPERTOKENS_DOMAIN,
          apiKey: process.env.SUPERTOKENS_API_KEY,
        },
        appInfo: {
          appName: "storefront",
          apiDomain: websiteDomain,
          websiteDomain,
          apiBasePath,
        },
        recipeList: [
          ThirdPartyEmailPasswordNode.init({
            providers: [],
          }),
          SessionNode.init(),
        ],
      })
    }
  • othiagocruz

    othiagocruz

    1 year ago
    Add the middleware BEFORE all your routes.
  • othiagocruz

    othiagocruz

    1 year ago
    i didnt do this
  • othiagocruz

    othiagocruz

    1 year ago
    just checked on the docs
  • r

    rp

    1 year ago
    You don’t need to. Just follow the next js example.
  • r

    rp

    1 year ago
    With-next example
  • r

    rp

    1 year ago
    I think I know what the errror is. Give me 5 mins please
  • othiagocruz

    othiagocruz

    1 year ago
    kk
  • r

    rp

    1 year ago
    can you please surround the whole init block above in a try catch and print out any error you see?