Error Code: email_not_found

Google oauth works fine, but we I try to login I get email_not_found error. Any idea why it happens?

  const config = {
    database: {
      db,
      type: "postgres",
    },
    socialProviders: {
      google: {
        clientId: options.googleClientId,
        clientSecret: options.googleClientSecret,
        redirectURI: `${options.productionUrl}/api/auth/callback/google`,
      },
      github: {
        clientId: options.githubClientId,
        clientSecret: options.githubClientSecret,
        redirectURI: `${options.productionUrl}/api/auth/callback/github`,
      },
    },
    secret: options.secret,
    plugins: [
      adminPlugin({
        ac,
        roles: {
          admin,
          user,
          taskMaintainer,
        },
      }),
      oAuthProxy({
        productionURL: options.productionUrl,
      }),
    ],
  } satisfies BetterAuthOptions;
Was this page helpful?