mkhorasani / Streamlit-Authenticator

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

0.2.4 login() is breaking - Throws Nonsensical Error on Login Button Location #109

Closed OldishCoder closed 5 months ago

OldishCoder commented 5 months ago

I was just setting up a new venv and decided to upgrade to the new release. Unfortunately, code that was working broke with:

File "D:\my.py", line 102, in <module>
authenticator.login('Login', 'sidebar')
File "D:\temp\conda\envs\StreamServe\lib\site-packages\streamlit_authenticator\authenticate.py", line 240, in login
raise ValueError("Location must be one of 'main' or 'sidebar'")
ValueError: Location must be one of 'main' or 'sidebar'

I reverted to 0.2.3 and the error went away

Looking at the code authenticator.py line 211 shows the issue. The call syntax is new and different and is breaking. Did we intend to break old code with this change?

mkhorasani commented 5 months ago

Hi @OldishCoder, please follow the readme file here. In the latest release (v0.3.1), the form_name parameter has been removed from the widget and instead has been replaced with a fields parameter that enables you to customize any or all of the text fields in the form.