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

passportConfigurator.setupModels() is not working with my custom userModel. #238

Closed
itaimoorali opened this issue Jan 3, 2018 · 3 comments
Labels

Comments

@itaimoorali
Copy link

What i did is copied the server.js file from this repo loopback-example-passport and just changed the userModel to my custom model. When i hit the /auth/facebook route its not creating the user inside my custom model but instead create a user in Default User model provided by loopback.
Please help me out.

@stale
Copy link

stale bot commented Mar 4, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 4, 2018
@stale
Copy link

stale bot commented Mar 18, 2018

This issue has been closed due to continued inactivity. Thank you for your understanding. If you believe this to be in error, please contact one of the code owners, listed in the CODEOWNERS file at the top-level of this repository.

@stale stale bot closed this as completed Mar 18, 2018
@tom-miseur
Copy link

The advice posted on the official Loopback documentation recommends extending the built-in models, yet this component requires a lot of modifications in order for that to be made possible, despite appearing to support model extensions via setupModels().

Furthermore, the concept of "linking" accounts doesn't match what I think most people's assumptions would be with it, that is to say, having a single "master" user account that is able to authenticate with whichever providers were registered, as well as being able to pull data from them once linked.

The article here more closely matches my expectations with what this component would provide.

It has definitely been a learning experience trying to work with the component, but at this point I'm much more inclined to simply use Passport directly.

Unfortunately I'm very new to Node.js and Loopback, and so I don't think I'll be able to contribute anything of sufficient quality to address these issues, beyond suggestion documentation edits. I would also appreciate if anyone could prove my synopsis here wrong.

@taimoor736 I managed to progress somewhat by uninstalling this module and using loopback-passport-component-c instead as it essentially fixes the problem you are facing. It is discussed here. However, if you plan on linking accounts in the way I've described, I would recommend using Passport directly instead as this module makes it rather tedious!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants