strongloop / loopback-component-passport

LoopBack passport integration to support third party logins and account linking
Other
139 stars 228 forks source link

3rd party re-login was not working using custom user models #256

Closed mkilp closed 4 years ago

mkilp commented 6 years ago

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.

slnode commented 6 years ago

Can one of the admins verify this patch? To accept patch and trigger a build add comment ".ok\W+to\W+test."

dhmlau commented 6 years ago

@slnode test please

mkilp commented 6 years ago

Tests seem successful, any updates on this? :)

dhmlau commented 6 years ago

@Nop0x , could you please sign the CLA https://cla.strongloop.com/agreements/strongloop/loopback-component-passport? @strongloop/sq-lb-apex @bajtos , could you please review? Thanks.

mkilp commented 6 years ago

@dhmlau Signed the agreement!

dhmlau commented 6 years ago

@slnode test please

rmg commented 6 years ago

@Nop0x did you sign it as @emdatabots?

mkilp commented 6 years ago

@rmg i did not mean to sign with @emdatabots, thats another github account of me for work. I'll be looking into your review.

rmg commented 6 years ago

@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 git config user.email personal@domain && git commit --amend --no-edit --reset-author && git push origin +master, assuming origin is the name of your fork remote)

stale[bot] commented 4 years ago

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[bot] commented 4 years ago

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.