anurag06557
03/06/2024, 10:05 AMconfig: {
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 outrp_st
03/06/2024, 4:19 PManurag06557
03/07/2024, 3:59 AManurag06557
03/07/2024, 4:20 AManurag06557
03/07/2024, 4:26 AM{ tokenAPIURL: 'https://oauth2.googleapis.com/token' } {
accessTokenAPIParams: {
client_id: '997955211260-4f17j7s4d5j935joiutqruntp6bc9ase.apps.googleusercontent.com',
redirect_uri: '',
code: '4/0AeaYSHDNib3uZC7vw58wEeR0DuOft-afqvEECQ1GNPd8NlQFuwSWcZ0fNoNeh6lZn8lkAw',
grant_type: 'authorization_code'
}
}
anurag06557
03/07/2024, 4:27 AMrp_st
03/07/2024, 5:48 AManurag06557
03/07/2024, 6:07 AMrp_st
03/07/2024, 6:17 AMrp_st
03/07/2024, 6:17 AMSuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).
Powered by