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 ?
r
rp_st
08/10/2023, 5:21 AM
hey @.qwertin which version of the frontend SDK are you using?