-
Notifications
You must be signed in to change notification settings - Fork 227
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
3rd party re-login was not working using custom user models #256
Conversation
Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test." |
@slnode test please |
Tests seem successful, any updates on this? :) |
@Nop0x , could you please sign the CLA https://cla.strongloop.com/agreements/strongloop/loopback-component-passport? |
@dhmlau Signed the agreement! |
@slnode test please |
@Nop0x did you sign it as @emdatabots? |
// When using custom user models, the relation between Identity and User does not seem to work. | ||
// Fetching the user model out of the identity. | ||
if (err) { | ||
cb(err, identity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this return
here? If the fall-through behaviour is expected then there should probably be a comment indicating why.
@rmg i did not mean to sign with @emdatabots, thats another github account of me for work. |
@Nop0x you signed as your normal user, but your commit is authored by your work account. You'll need to rebase and force push (probably something like |
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. |
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 |
Description
While using a custom user model I ran into the problem, that on a 3rd party login with Azure AD the user identity model was not able to find the related user model.
Therefore a login was never successful.
Fixed by manually looking up the user in the related user model (custom or not) and using this user object.
Related issues
Checklist
Ran the NPM tests which were already included, as I didn't implement new things.