Hey <@498057949541826571> , need ur help in social logins at backend this is my config for google `...
a

anurag06557

over 1 year ago
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
Hey, after updating to version 7 of supertokens core and version 16 of supertokens-node, I'm facing ...
f

fdundjer

almost 2 years ago
Hey, after updating to version 7 of supertokens core and version 16 of supertokens-node, I'm facing following error during user signup.
Error: UNKNOWN_USER_ID
    at EmailVerificationClaimClass.fetchValue (/Users/f//backend/node_modules/supertokens-node/lib/build/recipe/emailverification/emailVerificationClaim.js:31:27)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at EmailVerificationClaimClass.build (/Users/f/backend/node_modules/supertokens-node/lib/build/recipe/session/types.js:9:23)
    at Object.createNewSessionInRequest (/Users/f/backend/node_modules/supertokens-node/lib/build/recipe/session/sessionRequestFunctions.js:351:24)
    at Function.createNewSession (/Users/f/backend/node_modules/supertokens-node/lib/build/recipe/session/index.js:48:16)
    at Object.signUpPOST /Users/f/backend/node_modules/supertokens-node/lib/build/recipe/emailpassword/api/implementation.js:561:27)
    at Object.emailPasswordSignUpPOST (/Users/f/backend/apps/supertokens-service/src/supertokens/services/recipes/third-party-email-password.overrides.ts:561:22)...
Not sure it this could be the cause, but at the end of emailPasswordSignUp we call
const response = await originalImplementation.emailPasswordSignUp(
          input,
        );

    /* code for fetching external user */

    await createUserIdMapping({
          superTokensUserId: response.user.id,
          externalUserId: external.user.id,
        });

    response.user.id = external.user.id;
    return response;
We are using: image: registry.supertokens.io/supertokens/supertokens-postgresql:7.0