-
Notifications
You must be signed in to change notification settings - Fork 2.2k
refactor: rewrite removeAccountEmail without meteor #5577
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
Conversation
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]> refactor: configure url Signed-off-by: Erik Kieckhafer <[email protected]> refactor: configure url Signed-off-by: Erik Kieckhafer <[email protected]> refactor: pass shopId to email util Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
…teor method Signed-off-by: Erik Kieckhafer <[email protected]>
imports/plugins/core/accounts/server/no-meteor/mutations/removeAccountEmailRecord.js
Outdated
Show resolved
Hide resolved
imports/plugins/core/accounts/server/no-meteor/util/sendVerificationEmail.js
Outdated
Show resolved
Hide resolved
imports/plugins/core/accounts/server/no-meteor/util/sendVerificationEmail.js
Outdated
Show resolved
Hide resolved
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
| appEvents.on("afterAddUnverifiedEmailToUser", ({ email, userId }) => { | ||
| sendVerificationEmail({ email, userId }); | ||
| }); | ||
| import generateVerificationTokenObject from "/imports/plugins/core/accounts/server/no-meteor/util/generateVerificationTokenObject"; |
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 will be refactored very soon in the PR moving accounts registration out of here.
| const token = Random.secret(); | ||
| const when = new Date(); | ||
| const tokenObj = { token, email, when }; | ||
| const tokenObj = generateVerificationTokenObject({ email }); |
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.
@aldeed I removed this file in #5558 a few days ago, but it's been re-added by PR #5556, which you recently merged from the community. It was strange timing with my PR and that PR, and the rebasing inside #5556 probably just re-added it by accident.
Just want to make sure that it's OK to re-delete this file and it wasn't re-added on purpose.
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.
@kieckhafer There were conflicts when I merged that PR and I must have resolved them incorrectly. Make sure any changes from #5556 are in your non-Meteor version of the function, but otherwise OK to re-delete.
|
@aldeed all comments addressed |
Resolves parts of #5529
Impact: minor
Type: feature|refactor
Issue
An app event which sends an email,
afterAddUnverifiedEmailToUser, is being called inside aMeteor.startupfile. In our effort to removegetGraphQLContextInMeteorMethod, we need to move this outside of meteor and into theno-meteor/startupfile.Solution
Move the
afterAddUnverifiedEmailToUserappEvent call into theno-meteor/startupfile. This also entailed writing aremoveAccountEmailRecordGraphQL mutation. There was a pre-existing mutation schema, so the new mutation is based off this. This also entailed updating the Reaction Admin client UI to use this new mutation where applicable.Breaking changes
Any custom code using the
accounts/removeEmailAddressmeteor method will need to be updated to use the new GraphQL mutation.Testing