我试图将linkedIn oauth整合到我的网站中,但我坚持这个错误
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.linkedin.com/uas/oauth2/accessToken. (Reason: CORS header 'Access-Control-Allow-Origin' missing).
当我尝试使用授权代码获取accessToken时,我收到此错误。
请求&来自livehttpheaders的响应视图如下
https://www.linkedin.com/uas/oauth2/accessToken
POST /uas/oauth2/accessToken HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Referer: https://www.clovedigital.com/oauth/oauth_lnk.pl?code=AQRLhiv3oDKfFdN2ccXtSCOaC3ujQncdJ1QeFYw_c6iQVvrvy_M4w13IYny3cIzpPWzBPmOaI8DMZFp8pjbBvJHeni4MhbF5ig27SLkmVUHHKQYwB2U&state=mbclqkji
Content-Length: 277
Origin: https://www.clovedigital.com
Connection: keep-alive
grant_type=authorization_code&code=AQRLhiv3oDKfFdN2ccXtSCOaC3ujQncdJ1QeFYw_c6iQVvrvy_M4w13IYny3cIzpPWzBPmOaI8DMZFp8pjbBvJHeni4MhbF5ig27SLkmVUHHKQYwB2U&redirect_uri=https%3A%2F%2Fwww.clovedigital.com%2Foauth%2Foauth_lnk.pl&client_id=xxxxxxxxxxxxx&client_secret=xxxxxxxxxxxxxx
HTTP/1.1 200 OK
Cache-Control: no-cache, no-store
Content-Encoding: gzip
Content-Language: en-US
Content-Length: 220
Content-Type: application/json;charset=UTF-8
即使响应代码为200,我也没有收到任何accessToken作为响应。相反,我可以在控制台中看到那些Cross origin错误消息。需要帮助解决此问题