strongloop / loopback-example-passport

LoopBack example for facebook login
Other
185 stars 134 forks source link

Question on providers.json.template #44

Closed adriatic closed 9 years ago

adriatic commented 9 years ago

Except for "local strategy" all other providers x-login and x-link section in the template. What is the meaning of that and where can I read more about it?

jannyHou commented 9 years ago

hey @adriatic , to answer your question, let me give you a brief description about what is loopback-component-passport: It is a third-party login component, in this example app, you could provide your social account info in provider.json, like replace login and link with your own fb app id and secret, then after you run node . and open localhost:3000, you can login with fb account, or create your local account and link fb to it. For more details please check our Documentation And my suggestion is, if you have develop app from fb or google, please try it, then you would have a much clear idea about what's happening with passport. Hope this would be helpful for you. And for future references, please ask questions on google group Thanks!

sashasochka commented 8 years ago

Could you add other passport modules, not just google/twitter/facebook?

jannyHou commented 8 years ago

hey @sochka, I think as a demo, these three most popular accounts give users a clear idea about how passport work in loopback. If you have other good suggestions, please feel free to open a new issue and create a pull request to implement it! Thanks!

sashasochka commented 8 years ago

@jannyHou, well, actually I didn't ask you to implement it :) I just asked if this feature already exists. I should have said "Could I add..?". From your answer, I assume right now you cannot use passport-Vkontakte-token with loopback, right?

jannyHou commented 8 years ago

@sochka it's not supported yet but you can submit a patch in loopback-component-passport to add it: Add your new case here: https://github.com/strongloop/loopback-component-passport/blob/master/lib/passport-configurator.js#L204