mkhorasani/Streamlit-Authenticator

Allow forms with fewer fields

Closed this issue · 2 comments

I suggest allowing for fewer fields in the form. Right now, it seems like all fields are shown, even if a dict with fewer fields is passed as fields to Authenticate.register_user. Furthermore, to allow for Username to be optional, I suggest indexing on Email (which should always be present) instead of Username.

Is this a good idea? Could this be merged if I worked on it?

I see a few places in authenticate.py where the index would need to be replaced with email and some adjusted logic to only show and save what the function parameters call for (and not every field). Is there anything else that would make this more challenging?

Hi @shkarlsson, thank you for reaching out. I am definitely open to the idea of indexing by email as opposed to username as an option. I will attempt to address this in a future release and will keep you posted. Thanks.

Quasi-done! Please refer to v0.3.3. The user may now enter their username as a password.