feathersjs-ecosystem / authentication-oauth2

[MOVED] OAuth 2 plugin for feathers-authentication
https://github.com/feathersjs/feathers
MIT License
26 stars 15 forks source link

Update examples to work with latest OAuth payload #45

Closed binury closed 7 years ago

binury commented 7 years ago

Summary

This pull request updates both repository examples (README.md & app.js) to work with new Github payloads and solves #40. Emails are now an array rather than a single string property so the present examples are failing. Additionally, without explicitly specifying the user:email scope, it is possible to retrieve an empty array of emails as the token would be valid only for retrieving public emails. I elected to update the example scope accordingly rather than adding any further complexity to the customizeGithubProfile hook by attempting to handle those null cases.

Other Info

This change should be reflected in the main Feathers documentation referenced in the issue.

daffl commented 7 years ago

Thank you! Can you submit the same PR against the main documentation as well?

binury commented 7 years ago

The PR has been submitted: https://github.com/feathersjs/feathers-docs/pull/861

daffl commented 7 years ago

Perfect, thank you!