feathersjs-ecosystem / authentication-oauth2

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

Allow mutating options at runtime. #78

Closed daviddripps closed 6 years ago

daviddripps commented 6 years ago

May address #48 and #70. Will allow the flexibility for Shopify OAuth...and any other OAuth flows that require runtime data.

Summary

(If you have not already please refer to the contributing guideline as described here)

If so, please mention them to keep the conversations linked together.

Other Information

If there's anything else that's important and relevant to your pull request, mention that information here. This could include benchmarks, or other information.

Your PR will be reviewed by a core team member and they will work with you to get your changes merged in a timely manner. If merged your PR will automatically be added to the changelog in the next release.

If your changes involve documentation updates please mention that and link the appropriate PR in feathers-docs.

Thanks for contributing to Feathers! :heart:

daffl commented 6 years ago

Thank you for the pull request! Should we just allow to pass additional middleware after the options in the plugin? Basically changing https://github.com/daviddripps/authentication-oauth2/blob/eebfe7bf86f6a4abdbbe4b83b48b6f8476e5a28f/lib/index.js#L24 to function init (options = {}, ...middleware) { and applying that to the app.get call?

daffl commented 6 years ago

I am going to close this PR since the tests are failing and the code has been moved to https://github.com/feathersjs/feathers.

Related (moved) issue is https://github.com/feathersjs/feathers/issues/990