lavrd
06/09/2023, 11:35 AMidentityToken
and authorizationCode
. Which fields do I need to fill when make request to SuperTokens? Currenly, I have following error: the client for whom this key is for is different than the one provided
.rp_st
06/09/2023, 11:35 AMlavrd
06/09/2023, 11:38 AMlavrd
06/09/2023, 11:39 AM{
"redirectURI": "https://asd.asd",
"thirdPartyId": "apple",
"code": "asd",
"clientId": "sad"
}
rp_st
06/09/2023, 11:39 AMlavrd
06/09/2023, 11:43 AMlavrd
06/09/2023, 11:45 AM{
"redirectURI": "https://asd.asd",
"thirdPartyId": "apple",
"authCodeResponse": {
"access_token": "",
"id_token": ""
},
"clientId": ""
}
there are no panic on backend, but the client for whom this key is for is different than the one provided
in responserp_st
06/09/2023, 11:50 AMlavrd
06/09/2023, 11:53 AMrp_st
06/09/2023, 11:53 AMrp_st
06/09/2023, 11:53 AMrp_st
06/09/2023, 11:53 AMrp_st
06/09/2023, 11:54 AMlavrd
06/09/2023, 11:54 AM{
"message": "Please provide the access_token inside the authCodeResponse request param"
}
rp_st
06/09/2023, 11:55 AMrp_st
06/09/2023, 11:57 AMrp_st
06/09/2023, 11:57 AMlavrd
06/09/2023, 12:02 PMlavrd
06/09/2023, 12:06 PMservice id
in apple or app id
?rp_st
06/09/2023, 12:06 PMnkshah2
06/09/2023, 12:07 PMlavrd
06/09/2023, 12:07 PMnkshah2
06/09/2023, 12:07 PMlavrd
06/09/2023, 12:08 PMnkshah2
06/09/2023, 12:09 PMnkshah2
06/09/2023, 12:09 PMlavrd
06/09/2023, 2:12 PMrp_st
06/09/2023, 2:17 PMlavrd
06/11/2023, 10:11 PMcurl --location 'backend_with_supertokens>' \
--header 'rid: thirdparty' \
--header 'Content-Type: application/json' \
--data '{
"redirectURI": "<redirect_url>",
"thirdPartyId": "google",
"code": "<code>",
"clientId": "<client_id>"
}'
Provider API returned response with status `401 Unauthorized` and body `{
"error": {
"code": 401,
"message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
"status": "UNAUTHENTICATED"
}
}
`
When I try to exchange authorization code to access token manually by cURL, it works, example:
curl \
--request POST \
--data "code=<code>&client_id=<client_id>&client_secret=<client_secret>&redirect_uri=http://localhost:3000/callback&grant_type=authorization_code" \
https://accounts.google.com/o/oauth2/token
Thanks!rp_st
06/12/2023, 5:06 AMnkshah2
06/12/2023, 5:27 AMlavrd
06/12/2023, 5:57 AMrp_st
06/12/2023, 5:58 AMrp_st
06/12/2023, 5:58 AMnkshah2
06/12/2023, 5:59 AMlavrd
06/12/2023, 6:40 AMrp_st
06/12/2023, 6:40 AM