-
Notifications
You must be signed in to change notification settings - Fork 35
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
Feature/email settings change accounts ui #1770
Feature/email settings change accounts ui #1770
Conversation
@marla-singer Can you mentor and review? |
@bajiat Yes |
@@ -9,6 +9,24 @@ import { loginAttemptVerifier } from '/core/helper_functions/login_verify'; | |||
import { Settings } from '../collection'; | |||
|
|||
Meteor.methods({ | |||
configureSmtpSettings (settings) { |
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.
Remember to call this function on startup to set MAIL_URL env variable if process is killed and restarted.
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.
We are not currently doing that. Is it an issue right now?
} | ||
|
||
// If email is verified and parameters.allowed is true, user login is allowed | ||
if (verified && parameters.allowed) { |
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't understand why do you check verified and parameters.allowed? If user has verified as true and allowed as false, why login not allowed?
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.
@marla-singer I am not sure what parameters.allowed
means. Where does it come from? It was part of the code before I started working here.
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.
@brylie I dont' know too. But looks very strange
@brylie Don't forget to add condition for showForgotPasswordLink and showResendVerificationEmailLink. Now it isn't so. |
Thanks @marla-singer. Right now, I am not even able to get verification emails to send, so need to work on the links after sending works. |
I am getting a server console error when creating a new user, with email validation enabled:
This may be related to the Mailgun SMTP port. I have tried:
|
The above console error may be related to the email However, since I am not calling |
@brylie 587 did work for Mailgun when I worked with it earlier. |
@brylie Sending emails work! I used the free russian smtp server and got email 👍 But it was appeared in spam |
Looks like you found fix, but anyway FYI, https://github.com/meteor/meteor/blob/87681c8f166641c6c3e34958032a5a070aa2d11a/packages/accounts-password/password_server.js#L740 |
@brylie "Email address for sending emails" isn't updated in users emails. |
Try to login as un-exist user. Found: Message with text "Interval server error" and server console error Expected: Message with text "Login forbidden" |
@marla-singer please file the last comment as a new issue. It may not be in the scope of this issue. |
That might be fixed in commit a5f5b4c |
We have message with text "Login forbidden" on nightly and staging but don't in this branch |
Okay, maybe something's wrong on my side |
Cool. I am not sure what it might be, but will gladly fix it if it is a bug I've introduced. |
Great! Commit a5f5b4c fixed problem |
@brylie AccountsTemplates might need init after setting them, if we change them. |
Note: we cannot configure AccountsTemplates settings after they have been initialized: Update mail configuration: Error: Configuration options must be set before AccountsTemplates.init! We have to figure out a different solution, as part of another PR. |
We will not fix the links for this release. We must have email enabled |
yep, agreed |
@brylie "Verification email lost?" works, "Reset password" works. |
Yes, we need to create another issue for that. And can't fix it for |
I opened an upstream support request, asking how to change AccountsTemplates configuration after it has been initialized: |
Closes #1725
Closes #1727
Closes #1719
Closes #1742
Changes
loginAttemptVerifier
setting from AutoFormenv.MAIL_URL
template string to remove newlinesRationale
We probably only need to set the
loginAttemptVerifier
on startup, and update the function to handle our use cases: