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

Message Surrounded by Angle Brackets for Some Login Errors #369

Open
freelancewebdev opened this issue May 21, 2015 · 2 comments
Open

Message Surrounded by Angle Brackets for Some Login Errors #369

freelancewebdev opened this issue May 21, 2015 · 2 comments

Comments

@freelancewebdev
Copy link

Thanks for the great package - it has really saved me some work.

I have implemented Accounts.validateLoginAttempt with my own function which basically checks if the user's email is verified. Looks like:

// server/server.js
Meteor.startup(function(){
var isApproved = function(parameters) {
            if (parameters.user && parameters.user.emails && (parameters.user.emails.length > 0)) {
                var found = _.find(parameters.user.emails,function(thisEmail) { return thisEmail.verified });
                if (typeof found === 'undefined') {
                    throw new Meteor.Error('not-approved','Not approved yet', 'Your account has not been approved yet.  You will be informed by email when it is.')
                }
                return found && parameters.allowed;
            } else {
                return false;
            }
        }
        Accounts.validateLoginAttempt(isApproved);
})

When I try logging in with an account where the email has not been verified I get the error message returned in the alert box but it is surrounded by angle brackets as displayed:

accountentry

To verify that it wasn't an issue with accounts-base or accounts-password I temporarily added the {{> loginButtons}} call in my layout and the error was displayed correctly.

I am also seeing the brackets on other but not all errors - one that I remember is showing the problem is 'incorrect password', however, 'no match' is displayed correctly.

@queso
Copy link
Contributor

queso commented May 22, 2015

This package isn't really being maintained anymore. I would look at UserAccounts.

@freelancewebdev
Copy link
Author

Thanks for that. I was actually listening to your podcasts later and heard
you mention that. Might be good to stick a note in the readme to let others
know.
On 22 May 2015 15:39, "Josh Owens" [email protected] wrote:

This package isn't really being maintained anymore. I would look at
UserAccounts.


Reply to this email directly or view it on GitHub
#369 (comment)
.

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

No branches or pull requests

2 participants