-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
added onUserUpdate hook #9042
added onUserUpdate hook #9042
Conversation
@gerwinbrunner: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
It's weird to me that |
I agree that it should probably be called
|
@sebakerckhof Thanks for the input... I just went with what was in the comments of the original code. I'll change the name. @merlinpatt The purpose for this is to be able to update profile (or other data) after an OAuth login. |
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.
Thanks for working on this @gerwinbrunner! I've added a few minor style comments to this review. Other than those, I think we should get some tests in place for these changes. Would you mind adding tests for this? See the accounts - updateOrCreateUserFromExternalService - Facebook
test for a related example. Thanks again!
@@ -119,6 +119,22 @@ export class AccountsServer extends AccountsCommon { | |||
|
|||
this._onCreateUserHook = func; | |||
} | |||
|
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.
Can you adjust this so there is only one blank line before and after the onExternalLogin
function?
@@ -1433,15 +1449,22 @@ Ap.updateOrCreateUserFromExternalService = function ( | |||
// We *don't* process options (eg, profile) for update, but we do replace |
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.
This comment needs to change since we're now providing a way to process options. Please remove the XXX
line, and consider updating this comment to better reflect the new functionality. Actually, you could consider just removing this comment entirely - now that we're addressing options, the code here pretty much speaks for itself.
Hi @gerwinbrunner - just touching base on this. Have you had a chance to review my comments? |
Sorry, having pretty busy the last week. I will look into it this week
and update the PR.
Hugh Willson wrote:
…
Hi @gerwinbrunner <https://github.com/gerwinbrunner> - just touching
base on this. Have you had a chance to review my comments?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9042 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEm7uFwYvH501cdtin6FX2Y5NraMMvqks5sjpjjgaJpZM4PBnnE>.
|
@gerwinbrunner Have you had a chance to look at this again? Let us know if you'll have some time to wrap this up. Thanks! |
I've made the requested changes, so they should be reviewed by someone else.
All outstanding items here should now be addressed, so this is ready for a final review. |
Rebased and pushed to |
AFAICS this actually closes #7213 from 06/2016, and its followup meteor/meteor-feature-requests#68 |
Good catch - thanks @fgm! |
I found a missing feature documented in the code here:
https://github.com/meteor/meteor/blob/master/packages/accounts-base/accounts_server.js#L1433
So I just implemend it in the way the
onCreateUser
hook was done.