porcx
09/26/2023, 11:43 AMThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "google",
clients: [
{
clientId: config.google.auth_client_id,
clientSecret: config.google.auth_client_secret,
},
],
},
isDefault: true,
},
{
config: {
thirdPartyId: "clever",
clients: [
{
clientId: "CLIENT_ID",
clientSecret: "CLIENT_SECRET",
},
],
},
},
],})
It says The third party provider google seems to be missing from the backend configs supertokens. Can you help what I am doing wrong ?rp_st
09/26/2023, 12:27 PMporcx
09/26/2023, 2:08 PMrp_st
09/26/2023, 2:24 PMrp_st
09/26/2023, 2:25 PMrp_st
09/26/2023, 2:25 PMporcx
09/28/2023, 4:46 PM{
id: "custom",
get: (redirectURI, authCodeFromRequest) => {
return {
accessTokenAPI: {
url: "https://oauth.example.com/token",
params: {
client_id: "<CLIENT ID>",
client_secret: "<CLIENT SECRET>",
grant_type: "authorization_code",
redirect_uri: redirectURI || "",
code: authCodeFromRequest || "",
}
}.....,
}
}
}
Now my question here is do we have send request from our app to thirdparty provider with the above url to get the token or the we are doing something wrong with custom provider so that api will do these stuff on it's own without app sending request to thirdparty provider. I meant accessTokenAPI this does the exact thing right ?.rp_st
09/29/2023, 5:57 AMaccessTokenAPI
objectrp_st
09/29/2023, 5:57 AMporcx
09/29/2023, 6:41 AMconst thirdpartysignIn = async (redirectURL: string) => {
const authUrl = await getAuthorisationURLWithQueryParamsAndSetState({
authorisationURL: `${config.authUrl}auth/callback/thirdparty`,
providerId: "thirdparty",
});
window.location.assign(
`${config.authUrl}redirect/thirdparty?to=${authUrl}?redirect-uri=${redirectURL}`
);
};
and api redirects me to login page of the thirdparty and when logged in it redirects me here
http://auth.example.tt/auth/callback/thirdparty?code=b469a3d59a1360ee2297&state=21b54a710dc41f38d05b0
Instead of giving me the user info as google does.rp_st
09/29/2023, 6:46 AMporcx
09/29/2023, 6:48 AMrp_st
09/29/2023, 6:57 AM