-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Creating adapter for the plugged in passport strategies #2311
Comments
As I commented in #2312 (comment), I think our support for Passport strategies should be built on top of a LoopBack-specific extension point described by #2312. That means we need to implement #2312 before working on this story. |
I think this story depends on #2466: Add abstraction for authentication strategy. |
Some of this work seems to be occurring in the PR for #2467. |
The new adapter is published as @loopback/[email protected], an experimental package 🎉 https://www.npmjs.com/package/@loopback/authentication-passport We've tried 2 approaches:
It turns out the 1st approach is more consistent with non-passport based strategies and we have need more effort to fully support wrapping an express middleware. Closing it now. |
Description / Steps to reproduce / Feature proposal
We should allow users to plugin custom passport strategies like
passport-jwt
. I tried replacing our own implementation ofjwt
strategy with the community onepassport-jwt
in PR loopbackio/loopback4-example-shopping@3cbb0a8 to verify it works with our current@loopback/authentication
module, the missing part is make the strategy registration flexible.Acceptance Criteria
A reference for the implementation would be how we register a custom body parser in the application, see this test casewe have the extension point now 🎉passport
based strategies, which means when create the binding key/resolve the strategy name, make sure it's forpassport
particularly.See Reporting Issues for more tips on writing good issues
The text was updated successfully, but these errors were encountered: