https://discord.com/channels/603466164219281420/907932061669654548/1202007865028775937 I've started ...
i

ITEnthusiasm

over 1 year ago
https://discord.com/channels/603466164219281420/907932061669654548/1202007865028775937 I've started the migration from the Remix example to the Next.js app directory example. (At least for now.) And I think Remix does things way better. 😅 I wanted to suggest adding documentation on how to use the
ThirdPartyEmailPassword
option without using the Express middleware, and perhaps suggest exposing clear functions for it if they aren't yet available. (I assumed that they would be available since we now have things like
*withoutRequestResponse()
.) I've been approached multiple times on both my Remix and my SvelteKit examples regarding how to get
ThirdPartyEmailPassword
up and running. It seems to be the most common recipe (or one of the most common). And having a way to set things up clearly (without having to bring other SuperTokens packages into the mix) would likely be a big win. It might also alleviate some of the package management that SuperTokens has to deal with for various JS frameworks. I would look into it, but I unfortunately haven't had the time to scrutinize SuperTokens's internals like I did last time. 😅 I'm still looking for an opportunity. I'm only just now getting to the Next.js app dir example. (I know SuperTokens has one. This would just be one that would be more direct -- requiring less NPM packages and higher order functions.)
Guys I am facing an issue while fetching a user through email. The auth dashboard shows the user is ...
v

vaz007.

about 2 years ago
Guys I am facing an issue while fetching a user through email. The auth dashboard shows the user is signedUp and Auth method under Email password. If there is any other method to go through forgot password flow. In the current flow from frontend it sends a token, so it does not verify if a user is already present in the database. It just sends out the email to whatever email you provide. Frontend is used for thirdparty Following is config file import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword"; export function getApiDomain() { const apiPort = process.env.REACT_APP_API_PORT || 4001; const apiUrl = process.env.REACT_APP_API_URL || `http://localhost:${apiPort}`; return apiUrl; } export function getWebsiteDomain() { const websitePort = process.env.REACT_APP_WEBSITE_PORT || 3000; const websiteUrl = process.env.REACT_APP_WEBSITE_URL || `http://localhost:${websitePort}`; return websiteUrl; } export const SuperTokensConfig: TypeInput = { supertokens: { connectionURI: "localhost:3567", }, appInfo: { appName: "Auth Middleware Express", apiDomain: getApiDomain(), websiteDomain: getWebsiteDomain(), }, recipeList: [ ThirdPartyEmailPassword.init({ providers: [ // Google({ // clientId:"ID", // clientSecret: "SECRET", // }), ], }), Session.init({}), Dashboard.init(), UserMetadata.init(), ], }; Following is my controller file import { getUsersByEmail } from "supertokens-node/recipe/thirdpartyemailpassword"; export const createTokenForResetPassword = async (req: any, res: any) => { const { email } = req.body; try { const getUser = await getUserByEmail(email); console.log("EMAIL ", email); console.log("USER ",getUser); // const createVeriToken = await createResetPasswordToken(getUser.userId); res.send({ status: "OK" }); } catch (err) { res.status(500) } };