{"id":14959593,"url":"https://github.com/gaurisp10/streamlit_login_auth_ui","last_synced_at":"2025-04-04T20:11:13.493Z","repository":{"id":62592844,"uuid":"526984720","full_name":"GauriSP10/streamlit_login_auth_ui","owner":"GauriSP10","description":"It lets you connect your streamlit application to a pre-built and secure Login/ Sign-Up page.","archived":false,"fork":false,"pushed_at":"2024-04-07T12:45:58.000Z","size":5112,"stargazers_count":234,"open_issues_count":24,"forks_count":69,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-04T20:11:09.680Z","etag":null,"topics":["authentication","cookies","forgot-password","login-system","lottie-animation","python","streamlit","streamlit-component","user-authentication"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GauriSP10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-20T16:46:43.000Z","updated_at":"2025-04-01T16:26:03.000Z","dependencies_parsed_at":"2024-06-19T19:03:00.514Z","dependency_job_id":null,"html_url":"https://github.com/GauriSP10/streamlit_login_auth_ui","commit_stats":{"total_commits":29,"total_committers":3,"mean_commits":9.666666666666666,"dds":0.3793103448275862,"last_synced_commit":"4cda8d27a5871209f4cf86b2f5330f9f97994a54"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GauriSP10%2Fstreamlit_login_auth_ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GauriSP10%2Fstreamlit_login_auth_ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GauriSP10%2Fstreamlit_login_auth_ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GauriSP10%2Fstreamlit_login_auth_ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GauriSP10","download_url":"https://codeload.github.com/GauriSP10/streamlit_login_auth_ui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247242678,"owners_count":20907134,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","cookies","forgot-password","login-system","lottie-animation","python","streamlit","streamlit-component","user-authentication"],"created_at":"2024-09-24T13:20:11.046Z","updated_at":"2025-04-04T20:11:13.476Z","avatar_url":"https://github.com/GauriSP10.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nHOW TO INSTALL ALL LIBRARIES:\npython3.10 -m venv venv\nsource venv/bin/activate\npython3.10 -m pip install -r requirement.txt\n\n# Streamlit Login/ Sign Up Library   [![Downloads](https://static.pepy.tech/personalized-badge/streamlit-login-auth-ui?period=month\u0026units=international_system\u0026left_color=grey\u0026right_color=blue\u0026left_text=downloads)](https://pepy.tech/project/streamlit-login-auth-ui)\n\nThe streamlit_login_auth_ui library is meant for streamlit application developers.\nIt lets you connect your streamlit application to a pre-built and secure Login/ Sign-Up page.\n\nYou can customize specific parts of the page without any hassle!\n\nThe library grants users an option to reset their password, users can click on ```Forgot Password?``` after which an Email is triggered containing a temporary, randomly generated password.\n\nThe library also sets encrypted cookies to remember and automatically authenticate the users without password. \\\nThe users can logout using the ```Logout``` button.\n\n\n## Authors\n- [@gauriprabhakar](https://github.com/GauriSP10)\n\n## PyPi\nhttps://pypi.org/project/streamlit-login-auth-ui/\n\n## The UI:\n![login_streamlit](https://user-images.githubusercontent.com/75731631/185765909-a70dd7af-240d-4a90-9140-45d6292e76f0.png)\n \n## Installation\n\n```python\npip install streamlit-login-auth-ui\n```\n\n## How to implement the library?\n\nTo import the library, just paste this at the starting of the code:\n```python\nfrom streamlit_login_auth_ui.widgets import __login__\n```\n\nAll you need to do is create an object for the ```__login__``` class and pass the following parameters:\n1. auth_token : The unique authorization token received from - https://www.courier.com/email-api/\n2. company_name : This is the name of the person/ organization which will send the password reset email.\n3. width : Width of the animation on the login page.\n4. height : Height of the animation on the login page.\n5. logout_button_name : The logout button name.\n6. hide_menu_bool : Pass True if the streamlit menu should be hidden.\n7. hide_footer_bool : Pass True if the 'made with streamlit' footer should be hidden.\n8. lottie_url : The lottie animation you would like to use on the login page. Explore animations at - https://lottiefiles.com/featured\n\n#### Mandatory Arguments:\n* ```auth_token```\n* ```company_name```\n* ```width```\n* ```height```\n\n#### Non Mandatory Arguments:\n* ```logout_button_name```     [default = 'Logout']\n* ```hide_menu_bool```         [default = False]\n* ```hide_footer_bool```       [default = False]\n* ```lottie_url```             [default = https://assets8.lottiefiles.com/packages/lf20_ktwnwv5m.json]\n\nAfter doing that, just call the ```build_login_ui()``` function using the object you just created and store the return value in a variable.\n\n# Example:\n```python\nimport streamlit as st\nfrom streamlit_login_auth_ui.widgets import __login__\n\n__login__obj = __login__(auth_token = \"courier_auth_token\", \n                    company_name = \"Shims\",\n                    width = 200, height = 250, \n                    logout_button_name = 'Logout', hide_menu_bool = False, \n                    hide_footer_bool = False, \n                    lottie_url = 'https://assets2.lottiefiles.com/packages/lf20_jcikwtux.json')\n\nLOGGED_IN = __login__obj.build_login_ui()\n\nif LOGGED_IN == True:\n\n    st.markown(\"Your Streamlit Application Begins here!\")\n```\n\nThat's it! The library handles the rest. \\\nJust make sure you call/ build your application indented under ```if st.session_state['LOGGED_IN'] == True:```, this guarantees that your application runs only after the user is securely logged in. \n\n## Explanation\n### Login page\nThe login page, authenticates the user.\n\n### Create Account page\nStores the user info in a secure way in the ```_secret_auth_.json``` file. \\\n![create_account_streamlit](https://user-images.githubusercontent.com/75731631/185765826-3bb5d2ca-c549-46ff-bf14-2cc42d295588.png)\n\n### Forgot Password page\nAfter user authentication (email), triggers an email to the user containing a random password. \\\n![forgot_password_streamlit](https://user-images.githubusercontent.com/75731631/185765851-18db4775-b1f0-4cfe-86a7-93bda88227dd.png)\n\n### Reset Password page\nAfter user authentication (email and the password shared over email), resets the password and updates the same \\\nin the ```_secret_auth_.json``` file. \\\n![reset_password_streamlit](https://user-images.githubusercontent.com/75731631/185765859-a0cf45b0-bfa4-489d-8060-001a9372843a.png)\n\n### Logout button\nGenerated in the sidebar only if the user is logged in, allows users to logout. \\\n![logout_streamlit](https://user-images.githubusercontent.com/75731631/185765879-dbe17dda-93e3-4417-b5fc-5ce1d4dc8ecc.png)\n\n__Cookies are automatically created and destroyed depending on the user authentication status.__\n\n## Version\nv0.2.0\n\n## License\n[MIT](https://github.com/GauriSP10/streamlit_login_auth_ui/blob/main/LICENSE)\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaurisp10%2Fstreamlit_login_auth_ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaurisp10%2Fstreamlit_login_auth_ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaurisp10%2Fstreamlit_login_auth_ui/lists"}