Ability to change information before saving a user from facebook using a .js passport

I am trying to implement a login solution using Passport.js, Node, MongoDB and AngularJS. I want to โ€œinterruptโ€ the process when the user clicks โ€œlogin with facebook / twitter / otherโ€, so that after the user data is returned from facebook / other, the user should be able to change some of them, among others, their username to how the user object will be stored in the database (given that the username no longer exists). Where is the best place to interrupt this process? Is it possible to redirect to the page and send the object from the main passport.js file?

Thanks a lot!

+4
source share

All Articles