the apis: (originalImplementation) => { return { ...orig...
v
the apis: (originalImplementation) => { return { ...originalImplementation, signInUpPOST: async function (input) { if (originalImplementation.signInUpPOST === undefined) { throw Error("Should never come here"); } // First we call the original implementation of signInUpPOST. let response = await originalImplementation.signInUpPOST(input); // Post sign up response, we check if it was successful if (response.status === "OK") { let { id, email } = response.user; // This is the response from the OAuth 2 provider that contains their tokens or user info. let thirdPartyAuthCodeResponse = response.authCodeResponse; if (response.createdNewUser) { // TODO: Post sign up logic } else { // TODO: Post sign in logic } } return response; } } } } What is the Type for originalImplementation in typescript? We are getting an error here. import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword"; I took ThirdPartyEmailPassword .APIInterface type but getting signInUpPOST method not available error.
r
hey.
v
Hi
Here is no signInUpPOST method.
found thirdPartySignInUpPOST.
r
Yup. That’s the one to use
You are probably seeing the wrong recipe docs
v
Thanks.
Is supertokens allow multiple profiles(multi logins) for a single user?
r
Not yet. That’s a feature called account linking which will come out in a few months
v
Is there any exact timeline? So that we can for it.
r
aug end is what we are aiming for
v
Cool
supertokens: { // this is the location of the SuperTokens core. //connectionURI: "https://try.supertokens.com", connectionURI: "http://localhost:3567", apiKey: "abc" }, Intsalled supertokens core in Windows and started Added apiKeys : abc in config.yaml file. http://localhost:3567 showing Hello. getting error as Error: No SuperTokens core available to query Anything I missed?
r
are you using docker?
v
No.
But no database is added yet. it can use in-memory database right.
Using windows without docker.
r
it can. If you are not using docker anywhere, it's a windows firewall issue.
v
Hi
What I messed up here?
r
your backend server isnt started it seems..
also, i don't think it's a good idea to post a bunch of code like this and ask others to solve your problem. No one will help out like this for free.
you can ask specific questions, but you need to try and debug stuff by yourself first.
Good luck
v
Understand. Everything is setup as per documentation. Front end and backend server up and running. For backend, I'm able to access the dashboard user by hitting following URL http://localhost:3008/dashboard When I'm trying to signUp getting a CORS error (Browser network) and shows error as LoginPopup.js:113 TypeError: Failed to fetch at recipeImplementation.js:172:1
r
You should google cors error. It’s the cors lib issue
v
Thanks
3 Views