meteor/docs

Accounts.addEmail and Accounts.createUser - better docs / add feature / bug

alan-pl opened this issue · 6 comments

Accounts.addEmail and Accounts.createUser -- these API methods allow the email argument to be any non-empty string. This is not intuitive. I suggest one or more of these fixes:

  • document this behavior (simplest, easiest)
  • a server-side config setting could be available, like "rfcEmailsOnly: boolean", or "emailValidator: function", etc.
  • this could even be regarded as a bug, on the grounds that "addEmail" implies that the argument must be a valid email address. Maybe the methods should run a stricter validation, but that could be a breaking change.

Hi @alan-pl, can you open a PR against docs adding more details to these methods https://github.com/meteor/docs?

Feel free to also open a PR against the accounts package providing new options.

Can do. Now I'm wondering if this will all be solved by the introduction of TypeScript... Will the docs become typescript-y?

Yes, Typescript can help but I believe the docs will be useful in the future anyway, I would not wait for Typescript to have better docs.

I think you should go forward with a PR 😉

hi @alan-pl are you still willing to write a PR documenting this better?

Nope

As the docs are saying that is a String I believe it's ok.