-
Notifications
You must be signed in to change notification settings - Fork 75
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
Auth Related Questions #9
Comments
Hello there! Here are the answers:
I hope I've answered sufficiently.. As mentioned, I have to update the project as soon as possible so I shall get onto it as soon as I got time.. You should read further and decide for yourself, I'm not someone with much of experience.. I explored different projects around github and medium articles about the technologies I cared about and found a way to combine them together so if you could improve it just go for it.. Regards |
Thanks for the reply! That is very helpful info. For item 1: Thanks, I had not noticed the authenticate call there - that makes sense now. Just sharing for your interest... there, i think, still something unusual about the auth.service.ts implementation. In most examples I have seen, the passport.authenticate is for two separate routes on social login. In your case you call it once, and then do a lot of heavy-lifting still in the For an example, see this tutorial - one of the better ones that I have seen: https://scotch.io/tutorials/easy-node-authentication-facebook, and look at the following code:
I hope that is of some use... or if I am understanding it wrong, that would be good to know too. I am looking forward to seeing this project progress. It seems like some great work. Thanks |
I'm not 100% sure but I think the way you suggest is used with passport-facebook, not passport-facebook-token.. What happens in facebookSignIn is we construct a url to obtain an access token for the user and then manually invoke the passport-facebook-token strategy by sending a request to our local endpoint (passport-facebook-token needs to have access_token provided) |
OK, thanks for the clarification. With regards to my initial passport-facebook vs passport-facebook-token question: I did some further reading, and asked (and answered) a Stack Overflow question about it. I beleive that, for your use case, it may be worth switching to the facebook-passport strategy for additional security. I am going to have a go implementing passport-facebook in my nestjs project, and would be happy to share if I make progress with it, in case of any benefit for you. Thanks again for taking the time to answer my questions. |
I wish all the conversations on open-source projects are as polite as this. |
I'm submitting a...
First, thank for your sharing this code. There are very few good examples of auth with NestJS, and so I was grateful to find this one - which seems very nicely implemented.
In looking through the code, I had some questions to help me understand the choices.
Questions
passport.authenticate('facebook-token')
, which is the documented approach. Is this approach taken for a specific reason?Thanks for any answers.
The text was updated successfully, but these errors were encountered: