loopback4-microservice-catalog
loopback4-microservice-catalog copied to clipboard
@sourceloop/authentication-service: Error: No factory found for sf.passport.strategyFactory.localPassword
Describe the bug when using authentication service APIs to login getting following error: Error: No factory found for sf.passport.strategyFactory.localPassword
API checked: auth/login(Error: No factory found for sf.passport.strategyFactory.localPassword) auth/login-token(Error: No factory found for sf.passport.strategyFactory.ResourceOwner)
To Reproduce Steps to reproduce the behavior:
- setup authentication microservice using sourceloop CLI.
- create user through migration or manual
- hit Login API
Expected behavior user should be able to login successfully and it should return token to access to other resources
Screenshots
Additional context loopback cli: 6.0.0 sourceloop cli: 9.0.2 node:18.20.4 lerna 5.2.4
Hello @Sumit9669 the Local Passport strategy is not a mandatory strategy its an optional feature so to use that you are required to bind the strategy to its provider. you can refer the docs here
@yeshamavani thanks for responding but i had tried this as well earlier but were getting same issue.
Apart from that in following scenario everything works fine: sourceloop/cli: 4.2.0 node: 16.5 lerna : 5.4.2 authentication-service: v9.1.2
@yeshamavani thanks for responding but i had tried this as well earlier but were getting same issue.
Apart from that in following scenario everything works fine: sourceloop/cli: 4.2.0 node: 16.5 lerna : 5.4.2 authentication-service: v9.1.2
The strategy factory and its related binding needs to be provided after binding the component Can you please confirm if you have done it that way.
@Sumit9669 is it working for you
it is resolved. After providing required binding.
it is resolved. After providing required binding.
@prernagp @yeshamavani that time we were not able to solve it after providing binding, so we moved to lower version as we were on fast paced. For now you can close this issue, after updating dependencies if still breaks will re-open this issue.
Thanks a lot sourceloop team for assistance.
🙏