The third party provider google seems to be missing from the backend configs. I am getting this er...
l
The third party provider google seems to be missing from the backend configs. I am getting this error message while using google third party login What could be the issue? @rp_st please guide
r
hey @Lucifer979 what are you trying? Its there for sure - see our docs please.
l
I was trying to create third paty login using google
But when I make request from frontend I was getting 400 error
r
whats the error message?
l
When I coppied cURL and tested it on postman I was getting this error message
r
also, have you configured google in the provider list on the backend?
l
ThirdPartyEmailPassword.init({ providers: [{ config: { thirdPartyId: "google", clients: [{ clientId: "", clientSecret: "" }] } }]
I have Added this in recipeList
Copy code
{
  "message": "The third party provider google seems to be missing from the backend configs."
}
Error mesaage on postman
r
have you added this to supertokens.init?
whats your whole supertokens.init look like?
l
const supertokensConfig = { supertokens: { connectionURI: "https://try.supertokens.com", // apiKey: SUPERTOKEN_CORE_API_KEY, }, appInfo: { appName: "social-test", apiDomain: "http://localhost:3001", websiteDomain: "http://localhost:3000", apiBasePath: "/auth", websiteBasePath: "/auth" }, recipeList: [ Passwordless.init({ smsDelivery: { override: smsDelivery, }, contactMethod: "PHONE", flowType: "USER_INPUT_CODE", }), ThirdPartyEmailPassword.init({ providers: [{ config: { thirdPartyId: "google", clients: [{ /////// }] } }] }), Session.init({ cookieSecure: true, antiCsrf: "VIA_TOKEN", }), Dashboard.init(), UserMetadata.init(), EmailPassword.init(), jwt.init(), ], };
r
can you send over the request curl command?
also, you don't need to do emailpassword.init along with thirdpartyemailpassword.init. You can remove emailpassword.init
l
curl --location 'http://localhost:3001/auth/authorisationurl?thirdPartyId=google&redirectURIOnProviderDashboard=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Fcallback%2Fgoogle' \ --header 'Accept: */*' \ --header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \ --header 'Connection: keep-alive' \ --header 'Cookie: g_state={"i_l":0}; st-last-access-token-update=1711609588284' \ --header 'Origin: http://localhost:3000' \ --header 'Referer: http://localhost:3000/' \ --header 'Sec-Fetch-Dest: empty' \ --header 'Sec-Fetch-Mode: cors' \ --header 'Sec-Fetch-Site: same-site' \ --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36' \ --header 'content-type: application/json' \ --header 'fdi-version: 1.17,1.18' \ --header 'rid: thirdpartyemailpassword' \ --header 'sec-ch-ua: "Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'sec-ch-ua-platform: "macOS"' \ --header 'st-auth-mode: cookie'
r
seems about right. Not sure whats wrong here
are you using typescript?
you can also try our demo app - npx create-supertokens-app@latest to set it up and see.
You may be missing something.. not sure
l
Okay I checked it Issue is If I use supertoken-node version 16.7.4 everthing is working but if I use 14.1 it is not working Since my current backend is all built using version 14.1 can you please tell me which supertoken-auth-react and supertoken-web-js version to use with 14.1
Currently using super-token-auth-react(0.38.0) and supertoken-web-js(0.9.1)
r
l
I tried all the compatible versions as found in this but it was still not working
r
You are using the wrong syntax
See the older version of the docs
Or upgrade the backend SDK to the latest one
l
Did version 14.1 supported google login?
r
Yes
But the way to do it is different
l
Okay checking
r
See the older version of the docs
l
Where I can find that?
r
There should be a UI on the right with a button like see old docs
(On desktop view)
9 Views