mkhorasani / Streamlit-Authenticator

A secure authentication module to validate user credentials in a Streamlit application.
Apache License 2.0
1.37k stars 229 forks source link

Custom fields in reg form #50

Open bnxvs opened 1 year ago

bnxvs commented 1 year ago

Good day. Is it possible to add additional (custom) fields to the registration form? I edited your code for my application, but it's the wrong way ))) It would be very nice to be able to add some number of input fields without having to fix the code arbitrarily manually. Thank you for your job! Well done!

mkhorasani commented 1 year ago

Hey @bnxvs, sure thing will try to implement this in a future release. Cheers!

bnxvs commented 1 year ago

Thank you! Have a nice day (night)! ))

bnxvs commented 1 year ago

If you allow me, I have another question: If you take out all the text (the buttons caption, field headers) in a separate JSON file to localize, it will greatly affect the speed of the plugin? I'd help with translation into some languages (Russian, Kazakh, Spanish)...

mkhorasani commented 1 year ago

That's an interesting idea indeed. Again will attempt to address these issues in a future release. Thank you!

mkhorasani commented 5 months ago

Hi @bnxvs, this feature has been implemented in release v0.3.1. You can now customize the text of the fields/headers/buttons of all the widgets by passing your own labels to the fields parameter of each widget.

bosonie commented 3 months ago

Hello @mkhorasani I believe that this issue is not closed, since the request was to ADD fields to the registration form. A typical use case would be to add the 'Institution' as a new field of the registration form. As far as I saw, this is not currently possible. Am I right? Do you think this feature can be added? The solution can be as simple as interpreting new keywords defined in the fields parameter of register_user, with the caveat that we should then find a way fo make them available in the authenticator credentials.

mkhorasani commented 3 months ago

I believe you may be right! Sure will look into this for a future release.