Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: multi strategy #61

Merged
merged 42 commits into from
Feb 19, 2018
Merged

feat: multi strategy #61

merged 42 commits into from
Feb 19, 2018

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Feb 7, 2018

After talking with @breakingrobot we decided to keep this enhancement 100% 99.99 backward compatibles as we are now in rc phase.

This is our first step for built-in OAuth support! 🍷

What have been changed:

  • Templates renamed.
  • Auth class is fully refactored abstracted from authentication schemes. Only small utils are remaining.
  • New universal helper methods.
  • Current authentication logics moved into default local scheme.

Terminology:

  • Scheme: A generic auth flow implementation. Like GitHub, password-based, etc
  • Strategy: A configured scheme instance
  • Local: The default auth strategy with default local scheme and compatibility with current options.

Task list:

  • initial refactor
  • ensure tests passing
  • make strategies dynamic configurable
  • update the docs
  • support custom strategies
  • add some more strategies
  • [ ] a wiki page for how-to implementing strategies

As this is an almost big change, using branch to review changes is better.

@nuxt-community nuxt-community deleted a comment from codecov bot Feb 7, 2018
@nuxt-community nuxt-community deleted a comment from codecov bot Feb 16, 2018
@nuxt-community nuxt-community deleted a comment from codecov bot Feb 16, 2018
@codecov
Copy link

codecov bot commented Feb 16, 2018

Codecov Report

Merging #61 into master will decrease coverage by 2.89%.
The diff coverage is 80.55%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #61     +/-   ##
=========================================
- Coverage   86.95%   84.05%   -2.9%     
=========================================
  Files           4        4             
  Lines          46       69     +23     
  Branches        6       12      +6     
=========================================
+ Hits           40       58     +18     
- Misses          6       10      +4     
- Partials        0        1      +1
Impacted Files Coverage Δ
test/fixtures/basic/nuxt.config.js 100% <ø> (ø) ⬆️
lib/defaults.js 100% <ø> (ø) ⬆️
examples/api/auth.js 83.33% <ø> (ø) ⬆️
lib/module.js 83.33% <80.55%> (-6.15%) ⬇️

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 e94b726...2aed448. Read the comment docs.

@pi0
Copy link
Member Author

pi0 commented Feb 16, 2018

@breakingrobot codecov always adds a comment (or edit it if available) we can't do anything for that :D

@syffs
Copy link
Contributor

syffs commented Feb 18, 2018

I've tried adding a facebook scheme, not sure I got it right though...

SSR is not working and I'm not sure how accessToken is supposed to be sent back to the server. Any insight?

I also though about implementing this without SDK not sure what is the preferred way..

@pi0 pi0 mentioned this pull request Feb 19, 2018
@pi0
Copy link
Member Author

pi0 commented Feb 19, 2018

@syffs I've moved your request into new issue #73 to track it easier.

@pi0 pi0 merged commit 2aed448 into master Feb 19, 2018
@pi0 pi0 temporarily deployed to nuxt-auth February 19, 2018 17:03 Inactive
@pi0 pi0 deleted the multi-strategy branch February 19, 2018 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants