Skip to content
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

Verify email process #60

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Verify email process #60

wants to merge 12 commits into from

Conversation

ilkergonenc
Copy link
Collaborator

Sending a custom verification mail on new sign up.
Verify mail on a custom route/page and checks if it's already verified.

@eminx eminx temporarily deployed to cocoso-verify-email-7bbtso5ue8 July 1, 2022 11:41 Inactive
imports/api/_utils/services/mails/mail.smtp.js Outdated Show resolved Hide resolved
const accountVerification = Accounts.sendVerificationEmail(userId);
Meteor.call('sendVerificationLink', accountVerification);
// console.log(accountVerification);

Meteor.call('sendWelcomeEmail', userId);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only send the welcome email once user clicks and activates the account...

const newUrl = url.replace('#/', '');
return `Hi, To verify your account email, simply click the link below. ${newUrl}`;
},
};
});
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to somehow handle the i18n in this, since we have swedish users who would want in swedish...

emails:
verifyEmail:
subject: Please verify your email address
body: Hi, To verify your account email, simply click the link below
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swedish content?

@@ -16,6 +16,10 @@ Meteor.methods({
try {
const userId = Accounts.createUser(values);
if (userId) {
const accountVerification = Accounts.sendVerificationEmail(userId);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is causing the email to be sent already once. And then in the following method sendVerificationLink, there's another email coming. So there are two emails that arrive...

imports/api/users/user.methods.js Outdated Show resolved Hide resolved
imports/api/users/user.methods.js Outdated Show resolved Hide resolved
imports/api/users/user.methods.js Show resolved Hide resolved
imports/ui/pages/auth/VerifyEmailPage.jsx Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants