Open Y-LyN-10 opened 7 years ago
Merging #54 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #54 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 3 1 -2
Lines 59 10 -49
=====================================
- Hits 59 10 -49
Impacted Files | Coverage Ξ | |
---|---|---|
example/google_oauth_handler.js | 100% <100%> (ΓΈ) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Ξ = absolute <relative> (impact)
,ΓΈ = not affected
,? = missing data
Powered by Codecov. Last update 9499d49...9a38ee8. Read the comment docs.
Well, the uncovered part was in the example handler (auth callback) where the authentication has been successful, but there was no profile data from google plus (and there were no errors). I am not sure how to reproduce such a scenario in real-life and what is the desired result. :thinking:
In the example I returned 503 status code, which is like ... service is temporary unavailable or try again later. I added a test for that, but is that a real case at all? What are your thoughts? I'll do some research on that.
Hi, the latest merge commits were to update Readme.md docs with examples how to register and use this plugin with Hapi 17.
Also, important update: Hapi v17 is the latest and default version on NPM now and I assume that (very soon) people will try to use hapi-auth-google with it and they will run into non-compatibility issues. Is this PR good enough to solve this problem?
so are you planning on merging this soon?
Tests pass on localhost
(as expected given that they pass on Travis-CI):
Running the example/google.server.js
on localhost
:
Travis-CI is showing a "False Positive": https://travis-ci.org/dwyl/hapi-auth-google/builds/385615089 The tests are not passing. we're seeing the error:
{ Error: Line 16: Unexpected token function ...
This is because Google have changed their API in the latest version of googleapis
... π
We need to update our dependency on googleapis
... https://github.com/dwyl/hapi-auth-google/issues/55
Yeah, it's been a while since I opened this PR. I am not currently using google auth in my projects, but I will take a look later today and update what's needed. Thank you for the review, @nelsonic!
So, the latest googleapis works natively with async/await :tada: I was using util.promisify to achieve that flow before.
@Y-LyN-10 thank you for making those updates! π Sadly, there is still a "false positive" test that requires further investigation: π https://travis-ci.org/dwyl/hapi-auth-google/builds/386194728#L1302
# test/google.test.js > /googleauth?code=oauth2codehere
{ Error: invalid_request
at createError (/home/travis/build/dwyl/hapi-auth-google/node_modules/axios/lib/core/createError.js:16:15)
at settle (/home/travis/build/dwyl/hapi-auth-google/node_modules/axios/lib/core/settle.js:18:12)
at IncomingMessage.handleStreamEnd (/home/travis/build/dwyl/hapi-auth-google/node_modules/axios/lib/adapters/http.js:201:11)
Third attempt to propose these code changes :sweat_smile: :pray: Refers to: #51 and #55
Although, let's not rush to deliver. This is work-in-progress and code reviews are highly welcome.
Also, I have some additional comments / suggestions / questions: