Hello, I am trying to implement social login (google).... async function googleSignInClicked() { ...
u

.qwertin

almost 2 years ago
Hello, I am trying to implement social login (google).... async function googleSignInClicked() { try { const authUrl = await getAuthorisationURLWithQueryParamsAndSetState({ thirdPartyId: "google", // This is where Google should redirect the user back after login or error. // This URL goes on the Google's dashboard as well. frontendRedirectURI: "http://localhost:8100/auth/callback/google", }); /* Example value of authUrl: https://accounts.google.com/o/oauth2/v2/auth/oauthchooseaccount?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&access_type=offline&include_granted_scopes=true&response_type=code&client_id=1060725074195-kmeum4crr01uirfl2op9kd5acmi9jutn.apps.googleusercontent.com&state=5a489996a28cafc83ddff&redirect_uri=https%3A%2F%2Fsupertokens.io%2Fdev%2Foauth%2Fredirect-to-app&flowName=GeneralOAuthFlow */ // we redirect the user to google for auth. window.location.assign(authUrl); } catch (err: any) { if (err.isSuperTokensGeneralError === true) { // this may be a custom error message sent from the API by you. window.alert(err.message); } else { window.alert("Oops! Something went wrong."); } } } return { state, signUpClicked, signInClicked, googleSignInClicked }; }, }); and I get this error TS2345: Argument of type '{ thirdPartyId: string; frontendRedirectURI: string; }' is not assignable to parameter of type '{ providerId: string; authorisationURL: string; userContext?: any; providerClientId?: string | undefined; options?: RecipeFunctionOptions | undefined; }'.Object literal may only specify known properties, and 'thirdPartyId' does not exist in type '{ providerId: string; authorisationURL: string; userContext?: any; providerClientId?: string | undefined; options?: RecipeFunctionOptions | undefined; }'. What I am doing wrong ?
Hi, I am switching from managed services to self hosted. I am using python django, postgres database...
n

Namratha

almost 2 years ago
Hi, I am switching from managed services to self hosted. I am using python django, postgres database and docker. I have added db and supertoken service in my docker-compose.yml file and added connection_uri='http://localhost:3567' . I am getting hello response also if i call GET http://localhost:3567/hello. But I am getting error as "bmerit-api-supertokens-1 | Loading supertokens config. bmerit-api-supertokens-1 | Completed config.yaml loading. bmerit-api-supertokens-1 | Loading storage layer. bmerit-api-supertokens-1 | Loading PostgreSQL config. bmerit-api-supertokens-1 | Loading supertokens version.yaml file. bmerit-api-supertokens-1 | 04 Aug 2023 11:24:27:406 +0000 | INFO | pid: 2a4d173e-cfae-4b4d-9ad4-79486e5e31b6 | [main] thread | io.supertokens.storage.postgresql.ConnectionPool.initPool(ConnectionPool.java:136) | Setting up PostgreSQL connection pool. bmerit-api-supertokens-1 | bmerit-api-supertokens-1 | Setting up PostgreSQL connection pool. bmerit-db-super | 2023-08-04 11:24:27.662 UTC [75] ERROR: relation "apps" does not exist at character 15 bmerit-db-super | 2023-08-04 11:24:27.662 UTC [75] STATEMENT: SELECT 1 FROM apps LIMIT 1 bmerit-db-super | 2023-08-04 11:24:27.693 UTC [75] ERROR: relation "tenants" does not exist at character 15 bmerit-db-super | 2023-08-04 11:24:27.693 UTC [75] STATEMENT: SELECT 1 FROM tenants LIMIT 1 bmerit-db-super | 2023-08-04 11:24:27.705 UTC [75] ERROR: relation "key_value" does not exist at character 15 bmerit-db-super | 2023-08-04 11:24:27.705 UTC [75] STATEMENT: SELECT 1 FROM key_value LIMIT 1 " Please guide me in this.