Hey
@rp_st , need ur help in social logins
at backend this is my config for google
config: {
thirdPartyId: THIRD_PARTY.GOOGLE,
clients: [
{
clientId: process.env.GOOGLE_CLIENT_ID,
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
clientType: CLIENT_TYPE.WEB,
},
{
clientId: process.env.IOS_GOOGLE_CLIENT_ID,
clientType: CLIENT_TYPE.IOS,
},
{
clientId: process.env.ANDROID_GOOGLE_CLIENT_ID,
clientType: CLIENT_TYPE.ANDROID,
},
],
},
from frontend i am calling the api
curl -X 'POST' \
'http://localhost:3001/auth/signinup' \
-H 'accept: application/json' \
-H 'rid: thirdpartypasswordless' \
-H 'Content-Type: application/json' \
-d '{
"thirdPartyId": "google",
"clientType": "ios",
"redirectURIInfo": {
"redirectURIOnProviderDashboard": "",
"redirectURIQueryParams": {
"code": "4/0AeaYSHB4c8QnHY7fjQS0K8j169tLw6ONPV-5-JB7HfQ6tsa6Jq0GHyu0VDAz53L5LdYUZQ"
}
}
}'
but always getting error such as
Error: Received response with status 400 and body {
"error": "invalid_grant",
"error_description": "Bad Request"
}
at Object.exchangeAuthCodeForOAuthTokens (C:\Users\Ankit Gupta\Desktop\dh\dh-prajavani-auth\api\node_modules\supertokens-node\lib\build\recipe\thirdparty\providers\custom.js:259:23)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Object.signInUpPOST (C:\Users\Ankit Gupta\Desktop\dh\dh-prajavani-auth\api\node_modules\supertokens-node\lib\build\recipe\thirdparty\api\implementation.js:26:36)
please help me out