HttpError occur during get token
Young-Flash opened this issue · 2 comments
hi there.
I tried the example code in docs for google drive, but it don't work as expectation. There can direct browser to login my google account to google drive, but when I finish login I can't get the token. I trace the code in src/installed.rs
::exchange_auth_code
, it seems block at let (head, body) = hyper_client.request(request).await?.into_parts();
, I print the request
in console and get the follow:
Sending request: Request { method: POST, uri: https://oauth2.googleapis.com/token, version: HTTP/1.1, headers: {"content-type": "application/x-www-form-urlencoded"}, body: Body(Full(b"code=4%2F0AWtgzh4033jcoodsXkGo7IUZONaCbuwDEpdkMA46PNTNJ4Lp0JaZR4zgNVD5t17AQPBYYA&client_id=xxx&client_secret=xxx&redirect_uri=http%3A%2F%2F127.0.0.1%3A40161&grant_type=authorization_code")) }
after a while the HttpError occur occur: error: HttpError(hyper::Error(Connect, Custom { kind: Other, error: Os { code: 104, kind: ConnectionReset, message: "Connection reset by peer" } }))
.
I also tried ServiceAccountAuthenticator
and get the same error.
Is there anything I miss? Thanks for your time for help.
It's a problem with my network, nothing to do with the code. Sorry to interrupt.
No worries, relieved to see it's not a serious issue.