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

RememberMe.loginWithPassword argument types #38

Closed
evg1n opened this issue Oct 29, 2019 · 2 comments
Closed

RememberMe.loginWithPassword argument types #38

evg1n opened this issue Oct 29, 2019 · 2 comments

Comments

@evg1n
Copy link

evg1n commented Oct 29, 2019

Hello,

I think it would be a better practice to change argument type "username" from String to String or Object, because it is as such in Meteor.loginWithPassword( username || email [Type: String or Object], password, callback).

Because, some websites do not have username implementation and logs in only with email. So when you use (email, password) => Meteor.loginWithPassword({email: email}, password, [callback]) it works.

IMHO you should also implement this argument type to your RememberMe class.

Nice add-on, keep up the good work!

@tprzytula
Copy link
Owner

Hi evg1n,

That's a really good point!

I've completely missed the fact that you can use email in the initial implementation and introduced the fix for it to work in the 1.0.1 version. However, I did not update the documentation and JSDoc accordingly. Will make sure to do that when I will find some time this week.

Thanks a lot!

@tprzytula
Copy link
Owner

I've updated the code & docs with the fixes. They are now following the same wording as the official Meteor documentation & code does.

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