2014-01-08 5 views
3

oauth1 액세스 토큰을 사용하여 새 oauth2 새로 고치기 토큰을 얻으려고했지만 "invalid_token"오류가 계속 반환됩니다. 확인하고 액세스 토큰이 올바르게 작동하고 있습니다. 또한 oauth2 놀이터에서 같은 creds/params를 테스트했으며 결과는 같습니다. 우리는 OAuth1-> OAuth2를 토큰 마이그레이션의 검증 조각에 몇 가지 변경 한google oauth1 to oauth2 migration invalid_token 오류

> POST /o/oauth2/token HTTP/1.1 
Host: accounts.google.com 
Content-Type: application/x-www-form-urlencoded 
Authorization: OAuth oauth_nonce="cb7407355fe20f509cb6bf901eae2d24", oauth_timestamp="1389169471", oauth_consumer_key="***", oauth_token="1%2FFVy....", oauth_signature_method="HMAC-SHA1", oauth_signature="0YL1hH5R571nOH1byeHxQlg%2Fa6g%3D" 
Content-Length: 444 

* upload completely sent off: 444 out of 444 bytes 
< HTTP/1.1 400 Bad Request 
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate 
< Pragma: no-cache 
< Expires: Fri, 01 Jan 1990 00:00:00 GMT 
< Date: Wed, 08 Jan 2014 08:24:31 GMT 
< Content-Type: application/json 
< X-Content-Type-Options: nosniff 
< X-Frame-Options: SAMEORIGIN 
< X-XSS-Protection: 1; mode=block 
* Server GSE is not blacklisted 
< Server: GSE 
< Alternate-Protocol: 443:quic 
< Transfer-Encoding: chunked 
< 
* Connection #0 to host accounts.google.com left intact 
string(415) "HTTP/1.1 400 Bad Request 
Cache-Control: no-cache, no-store, max-age=0, must-revalidate 
Pragma: no-cache 
Expires: Fri, 01 Jan 1990 00:00:00 GMT 
Date: Wed, 08 Jan 2014 08:24:31 GMT 
Content-Type: application/json 
X-Content-Type-Options: nosniff 
X-Frame-Options: SAMEORIGIN 
X-XSS-Protection: 1; mode=block 
Server: GSE 
Alternate-Protocol: 443:quic 
Transfer-Encoding: chunked 

{ 
    "error" : "invalid_token" 
}" 
+0

문제를보고 해 주셔서 감사합니다. 나는이 스레드를 최대한 빨리 업데이트 할 것이다. –

답변

0

: 어떤 도움도 여기에

는 컬 자세한 출력입니다 ... 감사합니다. 마이그레이션 플로우를 다시 확인하고이 스레드를 결과로 업데이트 하시겠습니까?

1

{body}에 {} 안에 client_secret을 넣는 지 확인할 수 있습니까?

grant_type = 항아리 : IETF : PARAMS : OAuth를 : 보조금 유형 : 마이그레이션 : oauth1 & CLIENT_ID = xxxxxxx.apps.googleusercontent.com & client_secret = {XXXXXXX} 또한 {넣어해야합니다

} oauth_signature를 생성 할 때 client_secret 값 주위에