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

Don't echo password when registering a user #2

Closed
mweibel opened this issue Apr 22, 2014 · 6 comments
Closed

Don't echo password when registering a user #2

mweibel opened this issue Apr 22, 2014 · 6 comments

Comments

@mweibel
Copy link

mweibel commented Apr 22, 2014

I think it's common to not echo the password in a shell in case you need to enter the password. I've seen that you use IO.gets for this so probably elixir would need to have a password-prompt command ( read -s works in bash e.g., don't know how to implement this though)..

@josevalim
Copy link
Member

There is basically no way to get a password in Erlang. We have tried some approaches but it failed under certain circunstances, @ericmj do you remember which ones?

@ericmj
Copy link
Member

ericmj commented Apr 22, 2014

The issue is that the shell erlang starts by default doesn't support this. If we can find a way to start a shell that supports :io.get_password we can make it work.

I'm leaving this issue open because I really want to find a good solution for this. If anyone have any ideas on how to get :io.get_password to work please post them here.

EDIT:
:io.setopts([echo: false]) also don't work in the default shell.

@mweibel
Copy link
Author

mweibel commented Apr 23, 2014

If you start the erlang or elixir shell in CLI (using erl or iex), the :io.get_password()(or io:get_password()) seems to work. It does however not work within an escript (or within a mix task). Isn't it possible to start the same Shell as iex or erl? (i.e. start the new shell by default)

@ericmj
Copy link
Member

ericmj commented Apr 28, 2014

@josevalim Should we add your workaround or is too hacky?

@josevalim
Copy link
Member

Up to you. I guess we can try!

On Monday, April 28, 2014, Eric Meadows-Jönsson notifications@github.com
wrote:

@josevalim https://github.com/josevalim Should we add your workaround
or is too hacky?


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-41550246
.

José Valimwww.plataformatec.com.br
http://www.plataformatec.com.br/Founder and Lead Developer

@ericmj ericmj closed this as completed in a92defb Apr 29, 2014
@mweibel
Copy link
Author

mweibel commented Apr 29, 2014

nice! 🍻

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

3 participants