How to Add a User Authentication Service (Login Form) in Streamlit

  Рет қаралды 85,324

Coding Is Fun

Coding Is Fun

Күн бұрын

👉 Explore All My Excel Solutions: pythonandvba.com/solutions
𝗗𝗘𝗦𝗖𝗥𝗜𝗣𝗧𝗜𝗢𝗡
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
In this video, I will show you how to add a user authentication service (login form) in Streamlit so that your users can log in and see the content of your streamlit app. To implement the user authentication, we will use the ‘streamlit-authenticator’ library, a secure authentication module to validate user credentials in a Streamlit application.
🌍 𝗟𝗜𝗡𝗞𝗦:
▶ Demo Website: www.dashboarduserauth.pythona...
▶ Streamlit-Authenticator library: github.com/mkhorasani/Streaml...
▶ Example files from this video: github.com/Sven-Bo/streamlit-...
⭐ 𝗧𝗜𝗠𝗘𝗦𝗧𝗔𝗠𝗣𝗦:
00:00 - Introduction
00:33 - Create the helper file
02:43 - Implementation in the streamlit app
06:36 - Closing words
𝗧𝗢𝗢𝗟𝗦 𝗔𝗡𝗗 𝗥𝗘𝗦𝗢𝗨𝗥𝗖𝗘𝗦
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🆓【𝗙𝗥𝗘𝗘】Excel Add-in (𝗠𝘆𝗧𝗼𝗼𝗹𝗕𝗲𝗹𝘁): pythonandvba.com/mytoolbelt
📊 Data Visualization Excel Add-In (𝗚𝗿𝗮𝗳𝗹𝘆): pythonandvba.com/grafly
🤪 Fun Emoji Excel Add-In (𝗘𝗺𝗼𝗷𝗶𝗳𝘆): pythonandvba.com/emojify
📑 Excel Templates: pythonandvba.com/go/excel-tem...
🎓 My Courses: pythonandvba.com/go/courses
📚 Books, Tools, and More: pythonandvba.com/resources
𝗖𝗢𝗡𝗡𝗘𝗖𝗧 𝗪𝗜𝗧𝗛 𝗠𝗘
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
🔗 LinkedIn: / sven-bosau
📸 Instagram: / codingisfun_official
💻 GitHub: github.com/Sven-Bo
💬 Discord: pythonandvba.com/discord
📬 Contact: pythonandvba.com/contact
☕ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲?
If you want to support this channel, you can buy me a coffee here:
▶ pythonandvba.com/coffee-donation

Пікірлер: 252
@CodingIsFun
@CodingIsFun 2 жыл бұрын
🚨 *IMPORTANT* 🚨 Shortly after releasing the video, the streamlit-authenticator package got updated. The new version is incompatible with the syntax I have shown in the video. If you want to follow along with the video, please use version 0.1.5 : *pip install streamlit-authenticator==0.1.5* 👉[PART 2] Store the passwords in a database: kzfaq.info/get/bejne/m6mSe5WftbKdo4k.html *Happy Streamlit-ing!* 🎉
@mikekaspari1357
@mikekaspari1357 Жыл бұрын
Great. Does this work with the homepage function you have shown last week?
@mikekaspari1357
@mikekaspari1357 Жыл бұрын
Hi Sven, I tried by myself. It worked
@GidonLoewenberg
@GidonLoewenberg Жыл бұрын
Thanks for the tutorial (and the others too!). Would you be able to do an update for the new syntax? The 0.1.5 version has a bug where the username is case sensitive. This has been resolved in 0.2.1 and I would like to use it but can't figure out how to implement it correctly.
@poseidon907
@poseidon907 Жыл бұрын
any plans of updating the video to the newest version?
@CodingIsFun
@CodingIsFun Жыл бұрын
@@poseidon907 Once the package is more stable, I might do another video.
@PinkPixelRabbit
@PinkPixelRabbit 11 ай бұрын
Thanks for making these useful tutorials, Sven. You teaching style makes everything look simple and clear!
@CodingIsFun
@CodingIsFun 11 ай бұрын
*I am glad to hear you are enjoying them, thanks for watching and for the comment!*
@rics6035
@rics6035 Жыл бұрын
one year later, but still gold! Thanks a lot :)
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for the kind words. Glad you liked the video! :)
@theseenandunseen
@theseenandunseen Жыл бұрын
I only discovered your channel today. What a gem ! Keep up the good work, mate
@CodingIsFun
@CodingIsFun Жыл бұрын
Welcome aboard! Glad you like the videos! Thanks for watching and taking the time to leave a comment! 🤩
@EmptyNonsens
@EmptyNonsens Жыл бұрын
Wow, just discovered the channel and already found several solutions of my problems. Thank you for your work
@CodingIsFun
@CodingIsFun Жыл бұрын
I'm so happy to hear that you've found the videos useful! Thanks for watching and taking the time to leave a comment!
@gerhardvandalen4232
@gerhardvandalen4232 2 жыл бұрын
Great video, was exactly what I was looking for. Would definitely want to see a tutorial on how you setup Streamlit for user registration with passwords that feeds into a database (SQL lite). Keep up the good work
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you!
@QLY.
@QLY. 2 жыл бұрын
Although my major is not close to this type of science, but I just subbed to thank you for your github work that meant to help other students.
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for your sub & welcome aboard!
@MehulPatel-re8mc
@MehulPatel-re8mc 3 ай бұрын
Such clear and succinct instruction. Thank you!
@CodingIsFun
@CodingIsFun 3 ай бұрын
Glad I could help! Thanks for watching and for the kind words. Cheers, Sven ✌️
@maseedilyas203
@maseedilyas203 2 жыл бұрын
Awesome video as always, thanks for the useful content 👌
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you! :)
@bladimirjuniorpelaezhernan6863
@bladimirjuniorpelaezhernan6863 Жыл бұрын
Oh this man is incredible, I love python language. this channel have been very useful for me, to improve my Python learning and make new things thanks to you, greetings from Colombia dear friend.
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching and for your kind words! I'm so glad to hear that my channel has been helpful for you in improving your Python skills. By the way, I was in Colombia last year for vacation and was amazed by the friendly people there. Greetings to you too! 👍
@ceefarbs560
@ceefarbs560 2 жыл бұрын
Congrats on 20k subs man
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks a lot! :) 🎉
@ramykhalil4426
@ramykhalil4426 2 жыл бұрын
Great tutorial, yes we would appreciate having another tutorial to connect the authentication to a database where users can also change their credentials. Thanks again, best channel
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching and your comment!
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Please find the tutorial on how to store the usernames & passwords in a database here: kzfaq.info/get/bejne/m6mSe5WftbKdo4k.html
@florianroeseler2404
@florianroeseler2404 2 жыл бұрын
Very useful, thank you!
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Happy to hear that you find it helpful. Thanks for watching and your comment!
@gustavojuantorena
@gustavojuantorena 2 жыл бұрын
Great tutorial. It would be awesome if you make one about how to store the passwords in a database!
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you & well noted!
@michalfrankowski5328
@michalfrankowski5328 2 жыл бұрын
I am with you on that! It would be cool to know that.
@dishangmehta4397
@dishangmehta4397 2 жыл бұрын
Yes.. it would be of a great help if you could make a tutorial for database connectivity as well.. As always.. thanks for such easy to understand and to the point video
@CodingIsFun
@CodingIsFun 2 жыл бұрын
@@dishangmehta4397 Please find the tutorial on how to store the usernames & passwords in a database here: kzfaq.info/get/bejne/m6mSe5WftbKdo4k.html
@splamb6474
@splamb6474 2 жыл бұрын
Yes please, can we have a tutorial on storing users in a db?
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching the video & your comment. If more people would like to see it, I will be happy to make another video on storing the users in a DB :)
@reilagji4752
@reilagji4752 2 жыл бұрын
Yes please!
@barryvorster4696
@barryvorster4696 2 жыл бұрын
Yes please
@chriskeo392
@chriskeo392 Жыл бұрын
Yup I vote too
@amsathsherif659
@amsathsherif659 6 ай бұрын
​@@CodingIsFunyes please sir
@johnadam3269
@johnadam3269 Жыл бұрын
That was great. Good Job.💪
@CodingIsFun
@CodingIsFun Жыл бұрын
Glad you liked it. Thanks for watching and taking the time to leave a comment!
@alanmartins1497
@alanmartins1497 Жыл бұрын
Great video, this is very helpfull !
@CodingIsFun
@CodingIsFun Жыл бұрын
Thank you! 👍
@stephenhealy3963
@stephenhealy3963 2 жыл бұрын
Another great video. Dankeschön! Yes, please can we have a video on storing hashed passwords in a DB :o)
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Danke! Well noted! :)
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Please find the tutorial on how to store the usernames & passwords in a database here: kzfaq.info/get/bejne/m6mSe5WftbKdo4k.html
@georgecodeing7907
@georgecodeing7907 Жыл бұрын
thank u for the helpful tutorial
@CodingIsFun
@CodingIsFun Жыл бұрын
Happy to hear that it was helpful; thank you for taking the time to leave a comment and for watching the video!
@lorenzweb
@lorenzweb 2 жыл бұрын
Agree, this would super valuable if you could make the the authentication module look into a database instead of loading all the users into the script :-)
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Well noted :)
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Please find the tutorial on how to store the usernames & passwords in a database here: kzfaq.info/get/bejne/m6mSe5WftbKdo4k.html
@gustavofelicidade_
@gustavofelicidade_ Жыл бұрын
Many thanks!!!!
@CodingIsFun
@CodingIsFun Жыл бұрын
You're very welcome! Thank you for watching and for the comment!
@MrCwitharpg
@MrCwitharpg 2 жыл бұрын
Amazing content, please create tutorial on storing user details in a database
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks! I am already working on that tutorial. Stay tuned! :)
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Please find the tutorial on how to store the usernames & passwords in a database here: kzfaq.info/get/bejne/m6mSe5WftbKdo4k.html
@khalilebdelli6199
@khalilebdelli6199 10 ай бұрын
Thank you for creating such cool tutorials, have you uploaded any tutorials on how to store user info in a database?
@CodingIsFun
@CodingIsFun 10 ай бұрын
Thanks for watching. Yes, I have and I have also seen, that you found it already ;) kzfaq.info/get/bejne/m6mSe5WftbKdo4k.htmlsi=PNGbDS_5rPJIhy9V
@ricardo.alves.campos
@ricardo.alves.campos 2 жыл бұрын
As always, excellent video and I’m curious to see how it works with storing the password in a database.
@CodingIsFun
@CodingIsFun 2 жыл бұрын
As always, thanks for watching! :)
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Please find the tutorial on how to store the usernames & passwords in a database here: kzfaq.info/get/bejne/m6mSe5WftbKdo4k.html
@emeraldshuttlers203
@emeraldshuttlers203 Жыл бұрын
Loved it
@CodingIsFun
@CodingIsFun Жыл бұрын
Glad you liked it. Thanks for watching.
@phucle1669
@phucle1669 Жыл бұрын
thank your
@CodingIsFun
@CodingIsFun Жыл бұрын
Thank you for your comments under my video. I appreciate your support! :)
@seekingtruth9417
@seekingtruth9417 2 жыл бұрын
Thanks for the video. This is very helpful. Can you please let us know, how to add new users once the project is in production?
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks! I am working on a follow-up video to store the credentials in a database. I plan to release the video within the next week. Stay tuned!
@danielcampos8986
@danielcampos8986 Жыл бұрын
very good
@CodingIsFun
@CodingIsFun Жыл бұрын
Glad to hear you liked it! Thank you for commenting and watching.
@Investing_with_Livi
@Investing_with_Livi 11 ай бұрын
Vielen Dank ❤
@CodingIsFun
@CodingIsFun 11 ай бұрын
Danke fürs Anschauen! :)
@usernada
@usernada Жыл бұрын
Super helpful, thank you! As you mentioned, the streamlit-authenticator package got updated. Can minor changes be applied to meet those requirements? Or will it require an overhaul? Thanks!
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching the video. Sorry, but I do not understand your question. Can you perhaps elaborate on what it is you're trying to achieve? Please provide some additional info. Thanks!
@usernada
@usernada Жыл бұрын
@@CodingIsFun Since the streamlit-authenticator package got updated, how would you update the code to make it compatible with the new syntax? I'm curious whether this is a small or big change. What is the pros and cons of using the authenticator package version 0.1.5 versus the new one? Thanks again!
@christianrauth1425
@christianrauth1425 2 жыл бұрын
🔥 🚀
@CodingIsFun
@CodingIsFun 2 жыл бұрын
🚀🚀🚀
@S-Lomar
@S-Lomar 9 ай бұрын
Well done 🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰
@CodingIsFun
@CodingIsFun 9 ай бұрын
Thanks! 😍
@aryanprabhakar9891
@aryanprabhakar9891 Жыл бұрын
👍🏻
@CodingIsFun
@CodingIsFun Жыл бұрын
👍👍
@rasmuslindbjerre3686
@rasmuslindbjerre3686 2 ай бұрын
Thanks for the video! I have an additional question on top of this; do you know how RLS works in python/streamlit (ie. user pparker should only be able to see data subset A and rmiller should only be able to see subset B. A and B is part of the whole dataset yet they're not allowed to see eachothers data)?
@CodingIsFun
@CodingIsFun 2 ай бұрын
Thanks for watching. This is possible with conditional statements. As shown, you could retrieve the name (or access group) and then only show certain data to that person/group. Happy Coding! Cheers, Sven ✌️
@user-oe3uc9rg8v
@user-oe3uc9rg8v 2 ай бұрын
Great video. Is it possible to render the logout button as an option of the three-dots menu? or maybe at the left of the icon? I cant find anywere a way to override that behavior.
@CodingIsFun
@CodingIsFun 2 ай бұрын
As far as I know, this is not natively supported.
@yuriijooble8807
@yuriijooble8807 Жыл бұрын
Hi! thanks for the video, a lot of work done before me, but could you advise, how can I face it with multiapp ? login form is displayed only in Home page, but other pages still visible on the left panel (as different apps)
@CodingIsFun
@CodingIsFun Жыл бұрын
Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!
@hun2up390
@hun2up390 10 ай бұрын
Thank you for your turorial. Your videos are always helpful! But I have a question. I made a streamlit website which has ‘main.py’ in ‘main’ folder, and it has ‘sub.py’ in ‘pages’ folder which is under ‘main’ folder. So usually I enter ‘sub.py’ page through the ‘main.py’ page. In this case, can I make sure that ‘sub.py’ can be secured with only your codes as well?
@CodingIsFun
@CodingIsFun 10 ай бұрын
Thanks for watching and the kind words. I have not tested it with a multipage app, but feel free to try it out yourself. Happy Coding! :)
@ibaha411
@ibaha411 11 ай бұрын
@codingisfun can you make a new video for the latest version of the streamlit?
@CodingIsFun
@CodingIsFun 11 ай бұрын
Thank you for watching the video & your suggestion.
@sujin160
@sujin160 10 ай бұрын
Hi bro. Good video. How did you change the UI of login page?
@CodingIsFun
@CodingIsFun 10 ай бұрын
Hey bro. There is not parameter to change the design of the login page. You would not apply some custom CSS. Here is the official documentation: github.com/mkhorasani/Streamlit-Authenticator Happy Coding!
@georgikovachev8132
@georgikovachev8132 11 ай бұрын
Hi Sven, thank you for sharing this information. Do you know why when you click logout button the side bar appears not to be hidden. How can you check the state of the logout button? Thank you in advance!
@CodingIsFun
@CodingIsFun 11 ай бұрын
Thanks for watching. You might want to check the documentation of the package and/or create an GitHub issue: github.com/mkhorasani/Streamlit-Authenticator
@abhishekbhosale3628
@abhishekbhosale3628 2 жыл бұрын
Great tutorial !! Curious to know how to store the password in a databse. Hope you will make another tutorial video on it soon Also i want to know that can use use streamlit-authenticator and Google firebase to store the usernames and passwords?? If yes can you please explain it in the upcoming videos
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching the video & your suggestions!
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Please find the tutorial on how to store the usernames & passwords in a database here: kzfaq.info/get/bejne/m6mSe5WftbKdo4k.html
@abhishekbhosale3628
@abhishekbhosale3628 2 жыл бұрын
@@CodingIsFun Thank you so much
@sweetie_py
@sweetie_py Жыл бұрын
thank you so much. i have a question, how can I add a user authentication service with multi-pages streamlit app since all my pages lie in the sidebar? for single page, we can just do an if else and then render that page. but what is the case where i have multiple pages? Thanks
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching. I have not tried it with a multipage app yet, sorry!
@MisterThehood12
@MisterThehood12 2 жыл бұрын
Great video! Is it possible to have a login only for admins that gives them access to an admin page? Rest of the web app would be no required login and wouldn't be able to access this admin page. :)
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching. Not that I know of 😕
@aishworyann4928
@aishworyann4928 Жыл бұрын
Hello sir, firstly thanks for these type of informative videos. Secondly i am facing TypeError: list indices must be integers or slices, not str this error in line 22 , can you please help sir.
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.
@BumbaUmba84
@BumbaUmba84 10 ай бұрын
in our network of the organization everyone has static addresses, how to get the address of the client in order to check that it is possible to log in from this workplace
@CodingIsFun
@CodingIsFun 10 ай бұрын
Thanks for watching. Not sure how to implement that
@2001gpu
@2001gpu Ай бұрын
When clicking the log out button nothing happens. However, I want to be redirected to the login form. Do you know what the problem could be? Thank you for a great video!
@peakpointforex
@peakpointforex Жыл бұрын
Thank you so much for this video. Well explained. I have an error though when I deploy my streamlit app on streamlit cloud: TypeError: __init__() got multiple values for argument 'cookie_expiry_days' Any ideas on how to solve this?
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching. Please check out the pinned comment
@peakpointforex
@peakpointforex Жыл бұрын
@@CodingIsFun Thank you 👍
@peakpointforex
@peakpointforex Жыл бұрын
The new version of streamlit works now. Thank you so much 🙂
@lebdev853
@lebdev853 2 жыл бұрын
Greate tutorial. What about having groups that contains many users . Like users under the group of sales department User under the group of IT department. Can this be done ??
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you! I think you have everything you need to implement it. A straightforward implementation would be to create a dictionary to assign each person to a department. In the streamlit app, you could then restrict the content based on the department.
@MenteyExito
@MenteyExito 5 ай бұрын
Great video! What if, I have 5 different pages inside my app for 5 different users. Is there a way I can create a login page where user 1 enters his credentials and see HIS dashboard and not the other 4?
@CodingIsFun
@CodingIsFun 5 ай бұрын
Thank you for watching. This seems feasible using the Streamlit Authenticator package. Please refer to the documentation: github.com/mkhorasani/Streamlit-Authenticator. For example, you could define various roles and add them to your database when someone registers. Within your Streamlit app, you would then need to check if the respective user has the required role to access the app. Happy Coding!
@MenteyExito
@MenteyExito 5 ай бұрын
@@CodingIsFun Thank you!
@aditirajesh8314
@aditirajesh8314 7 ай бұрын
Hi there, this video is incredible, love your streamlit tutorials. Just a question, the streamlit authentication never turns true for me even when i enter the correct login id and password. I am using a database but I have connected it perfectly to python.I followed your video to the t. Do you have an idea where I might be going wrong?
@CodingIsFun
@CodingIsFun 7 ай бұрын
Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.
@giressepatrick5275
@giressepatrick5275 10 ай бұрын
Thank you very much 👏👏 so I want to know :how to do it with multi-page streamlit application ? when I try it, authentication is only for the page where I put the code and the user can easily access other pages without authentication.
@CodingIsFun
@CodingIsFun 10 ай бұрын
Thanks for watching. I have not tried it with a multi-page app. You might want to check out the docs to see if that is possible or raise an issue/question here: github.com/mkhorasani/Streamlit-Authenticator
@giressepatrick5275
@giressepatrick5275 10 ай бұрын
@@CodingIsFun ok thank you very much for your prompt reaction
@InteligenciadeNegocios
@InteligenciadeNegocios Жыл бұрын
Hi, thank you for this video. Can you please help me with the following error: __init__() got multiple values for argument 'cookie_expiry_days' Thank you
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching. Kindly have a look at the pinned comment.
@InteligenciadeNegocios
@InteligenciadeNegocios Жыл бұрын
@@CodingIsFun Thank you! Now is working! excellent content!
@arcanum360YT
@arcanum360YT 7 ай бұрын
Hello, it seems that the streamlit version has been updated and I've seen somewhere it uses a dict as part of the authenticator. Kindly do another video on this. Thankyou
@CodingIsFun
@CodingIsFun 7 ай бұрын
Thanks for watching. That is correct, as mentioned in the pinned comment: Shortly after releasing the video, the streamlit-authenticator package got updated. The new version is incompatible with the syntax I have shown in the video. If you want to follow along with the video, please use version 0.1.5 : pip install streamlit-authenticator==0.1.5
@arcanum360YT
@arcanum360YT 7 ай бұрын
Ok thanks@@CodingIsFun
@wanpynskhempyngrope9263
@wanpynskhempyngrope9263 2 жыл бұрын
I'm doing a project in streamlit using firebase but I'm having issue where since streamlit runs the code top to bottom i tried using the session state but I'm not if it's right or wrong but it's not working what i wanna achieve is am able to login n then if i refresh the page or go to a new section....it should maintain the last session.... without logging in again..... Cause if i refresh page login page appears again... 😢 Anyone got any idea or please make a video on this topic
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching the video & your video suggestion.
@ericsamson731
@ericsamson731 2 жыл бұрын
So the pickle file holding the passwords and usernames is secure? If I had this on GitHub or somewhere could someone read into the pickle file to get the values?
@CodingIsFun
@CodingIsFun 2 жыл бұрын
The pickle file holds only the hashed passwords (1:51 min). As mentioned (6:20 min), you could also store them in a database. That said, even if the hashed passwords are accessible, it will be hard to crack them: security.stackexchange.com/a/130946
@lucasnascimento_xlsx
@lucasnascimento_xlsx 7 ай бұрын
Supar
@CodingIsFun
@CodingIsFun 7 ай бұрын
Thanks! :)
@srilaxmip9
@srilaxmip9 6 ай бұрын
Could you create a video on how we can get user statistics, like number of active users using your app currently? Note: In my app, I dont have any authentication enabled, but accessible to all users within our organization with the url. we deployed the app using aws.
@CodingIsFun
@CodingIsFun 6 ай бұрын
Thanks for watching and your video suggestion.
@srilaxmip9
@srilaxmip9 6 ай бұрын
@@CodingIsFun Do you know any streamlit packages which can serve this purpose?
@honeyvasu1599
@honeyvasu1599 Ай бұрын
Hello there, I'm getting some problem in the login authentication. I am always re-authenticating the user . If iam refreshing the page it asking me for re-authentication. I am using vs code
@CodingIsFun
@CodingIsFun Ай бұрын
Thanks for watching. Hard to tell from a distance. Cheers, Sven ✌️
@austinmerrill752
@austinmerrill752 Жыл бұрын
yes how about tutorial on connectiong to database for passwords
@CodingIsFun
@CodingIsFun Жыл бұрын
Here you are: kzfaq.info/get/bejne/m6mSe5WftbKdo4k.html
@Gulo0fficial
@Gulo0fficial Жыл бұрын
I have problem when running my app.py EOFError: Ran out of input Traceback: File "C:\Users\ASUS\AppData\Local\Programs\Python\Python39\lib\site-packages\streamlit untime\scriptrunner\script_runner.py", line 556, in _run_script exec(code, module.__dict__) File "E:\StreamlitProject\Sales Dashboard\app.py", line 24, in hashed_passwords = pickle.load(file)
@CodingIsFun
@CodingIsFun Жыл бұрын
Please try downgrading your streamlit-authenticator package to 0.1.5 by running *pip install streamlit-authenticator==0.1.5* . Afterwards, kindly try it again. Thank you!
@basheer7619
@basheer7619 Жыл бұрын
__init__() got multiple values for argument 'cookie_expiry_days' how to solve this error sir
@CodingIsFun
@CodingIsFun Жыл бұрын
Check out the pinned post
@mastoring
@mastoring Жыл бұрын
Thank you very much! I am coming across the following error: KeyError: 'st.session_state has no key "authentication_status". Did you forget to initialize it?
@CodingIsFun
@CodingIsFun Жыл бұрын
At which part of the video (timestamp) and which line number?
@mastoring
@mastoring Жыл бұрын
@@CodingIsFun it refers to the line 26, timestamp is 4:14
@CodingIsFun
@CodingIsFun Жыл бұрын
@@mastoring please ensure to use version 0.1.5 and try again (as written in the pinned comment)
@ordaflash
@ordaflash Жыл бұрын
Hello, i got the same Error, what did you do to resolve it please ?
@JaidMirajkar
@JaidMirajkar Жыл бұрын
Can anyone please tell me how to stop the login form appearing again when I refresh the entire page? I know streamlit executes the code from top to bottom. I even tried @st.cache on top my function but seems like my entire application disappears after using it.
@CodingIsFun
@CodingIsFun Жыл бұрын
Sorry, but I cannot replicate this issue. Usually, the login credentials should be stored in a cookie, as explained in the video.
@JaidMirajkar
@JaidMirajkar Жыл бұрын
@@CodingIsFun Thank you for the prompt response. The login and logout mechanism are working as expected. But if you see in your video at 6:08, when you hit the refresh button, the login page appears for a split second and then disappears. That is my issue. I don't want to see that page once I am into my home page or into my main dashboard.
@CodingIsFun
@CodingIsFun Жыл бұрын
@@JaidMirajkar As far as I know, there is not fix to this issue
@ArbazHBamboowala
@ArbazHBamboowala 5 ай бұрын
sorry am again commenting so you would see it and comes to your attention: Hey Sven, Thank you so much for this video. I did tried it to my code, I am facing an issue. Screen goes completely blank and I cannot see anything. I added debugging using st.write("this session 1 has error") and so on but nothing comes up. Also inspect element shows display:blocked (strike on it). Dont know what went wrong, I added the code under function def main()?
@CodingIsFun
@CodingIsFun 5 ай бұрын
Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.
@ArbazHBamboowala
@ArbazHBamboowala 5 ай бұрын
@@CodingIsFun you have an email address where I can share my code? I am really enthusiastic about developing this application of mine. I have been looking for a job since 1 year and still havent landed one, I would really appreciate even a chunk of help!!!
@fongz2087
@fongz2087 4 ай бұрын
When I run the script at 2:19 the termainal show me "File "", line 1, in NameError: name '__file__' is not defined. Did you mean: '__name__'?", How can i fix it ?
@CodingIsFun
@CodingIsFun 4 ай бұрын
Hey there, thanks for watching the video! I'm sorry I can't help you with your problem based on the information you provided. To give me a better idea of what's going on, it would be super helpful if you could write down which line of code is causing the error, let me know if you modified the code from the tutorial, and explain in more detail what you did to troubleshoot the problem. Don't forget to also give me some context about your setup and environment. If you're having trouble figuring things out, another option is to join our Discord server at pyhtonandvba.com/discord. You can ask your question there and maybe someone in the community can help out. Thanks for understanding.
@ArminEskandary
@ArminEskandary 2 жыл бұрын
Bro I have a question . Plz answer . Does streamlit works with cpanel ?
@CodingIsFun
@CodingIsFun 2 жыл бұрын
As far as I know, it doesn't.
@villeolof2000
@villeolof2000 Жыл бұрын
Awesome! But I can somehow not create the file, should there be anything where it says "__file__" or "file_path" and should it be inside " " marks? I can't create it
@villeolof2000
@villeolof2000 Жыл бұрын
Never mind, I fixed it
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching. Glad you fixed it.
@villeolof2000
@villeolof2000 Жыл бұрын
@@CodingIsFun Thank you! I am already on the next video in this series, the verification email takes long time for me to get though. I’ll be patient, but I have resent it multiple times, hopefully I get the verification email soon! :D Your tutorials have leaned me so much!
@villeolof2000
@villeolof2000 3 ай бұрын
@@sandhupb02 I didn’t. So if you ever fix it, please let me know how. 😀
@sohamsinha3419
@sohamsinha3419 Жыл бұрын
Hey, thanks for the video. I used streamlit-authenticator version 0.1.5 for the same code, but I am still facing some errors in my file. I am facing the error: "no module named 'streamlit_authenticator.hasher'" in the hashed_passwords = pickle.load(file) line. Could you please look into this?
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.
@sohamsinha3419
@sohamsinha3419 Жыл бұрын
Nevermind, It worked. Thanks!
@CodingIsFun
@CodingIsFun Жыл бұрын
@@sohamsinha3419 how did you solve it?
@sohamsinha3419
@sohamsinha3419 Жыл бұрын
@@CodingIsFun I was importing data from excel as a means to store usernames and passwords somewhere outside the code editor. One of the passwords was an integer and the hasher function doesn't allow integers to be encoded, which was a main part of my problem. I also had to reinstall streamlit-authenticator with the version 0.1.5 (it didn't save the version somehow).
@Lyricverse116
@Lyricverse116 6 ай бұрын
How to create that pickle file ?
@CodingIsFun
@CodingIsFun 6 ай бұрын
Thanks for watching. I have shown that in the video. Kindly rewatch it! :)
@Lyricverse116
@Lyricverse116 6 ай бұрын
@@CodingIsFun thank you
@oussamasassour6090
@oussamasassour6090 Жыл бұрын
Hi it is verry interesting, but i still have this error of truncating.any help pleas ? ""UnpicklingError: pickle data was truncated"">> hashed_passwords = pickle.load(file)
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.
@bomb143
@bomb143 Жыл бұрын
I tried to install pip install streamlit-authenticator==0.1.5 . There is a error they are showing it to me ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'c:\\programdata\\anaconda3\\lib\\site-packages\\jwt\\algorithms.py' Consider using the `--user` option or check the permissions. This is what the error its showing to me help me please
@CodingIsFun
@CodingIsFun Жыл бұрын
Please try " pip install streamlit-authenticator==0.1.5 --user"
@bomb143
@bomb143 Жыл бұрын
@@CodingIsFun oh it worked. Thanks
@amirouchedjema8082
@amirouchedjema8082 7 ай бұрын
thank you for the video very useful but it works just with streamlit-authenticator==0.1.5
@CodingIsFun
@CodingIsFun 7 ай бұрын
Thanks for watching. That is correct (as stated in the pinned comment) :)
@zahiruddinzahidanishah787
@zahiruddinzahidanishah787 2 жыл бұрын
Great video. I have tried several times, but received an error stating: TypeError: list indices must be integers or slices, not str Traceback: File "/opt/anaconda3/lib/python3.9/site-packages/streamlit/scriptrunner/script_runner.py", line 554, in _run_script exec(code, module.__dict__) File "auth.py", line 41, in authenticator = stauth.Authenticate(names, usernames, passwords, File "/opt/anaconda3/lib/python3.9/site-packages/streamlit_authenticator/authenticate.py", line 36, in __init__ self.credentials['usernames'] = {key.lower(): value for key, value in credentials['usernames'].items()} Any idea what caused this error? TQ
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching. Shortly after releasing the video, the package got updated and is not compatible with the syntax I have shown in the video. If you want to follow along with the video, please use version 0.1.5 👉 "pip install streamlit-authenticator==0.1.5"
@zahiruddinzahidanishah787
@zahiruddinzahidanishah787 2 жыл бұрын
@@CodingIsFun greats, now it works well. Thank you, sir.
@ahmedsayed7138
@ahmedsayed7138 2 жыл бұрын
@@CodingIsFun when i set my package to version 0.1.5 everything worked perfect. but when i deployed to heroku the first time I got: No module name streamlit_authenticator and the second time my app crashed !! can you help me?
@CodingIsFun
@CodingIsFun 2 жыл бұрын
@@ahmedsayed7138 Did you include it in the requirements.txt file?
@sushilmudgal203
@sushilmudgal203 Жыл бұрын
facing script runner error how to resolve ?
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching and for your question. Hard to tell from a distance why you are facing an error. Sorry that I cannot help.
@sushilmudgal203
@sushilmudgal203 Жыл бұрын
@@CodingIsFun Can you write an erp software code for me for student employee management system
@CodingIsFun
@CodingIsFun Жыл бұрын
@@sushilmudgal203 Nope, sorry
@diogomonteiro7022
@diogomonteiro7022 5 ай бұрын
I have a streamlit_autheticator problem, could anyone help me? KeyError: 'usernames'
@CodingIsFun
@CodingIsFun 5 ай бұрын
Shortly after releasing the video, the streamlit-authenticator package got updated. The new version is incompatible with the syntax I have shown in the video. If you want to follow along with the video, please use version 0.1.5 : pip install streamlit-authenticator==0.1.5
@diogomonteiro7022
@diogomonteiro7022 5 ай бұрын
thank you very much! I managed to make it work..
@TharushikaHettiarachchi
@TharushikaHettiarachchi Жыл бұрын
If you got an error as 'cannot import name 'path' from 'pathlib'', then change the following code lines # from pathlib import path to import pathlib and #file_path = path(__file__).parent / 'hashed_pw.pkl' to file_path = pathlib.Path(__file__).parent / 'hashed_pw.pkl'
@CodingIsFun
@CodingIsFun Жыл бұрын
Pathlib is a core Python module available in Python 3.4 and above. To import it ensue to use a capital letter (as shown in the video): from pathlib import Path
@TharushikaHettiarachchi
@TharushikaHettiarachchi Жыл бұрын
@@CodingIsFun Thank you
@cse_07_akhilsanthosh96
@cse_07_akhilsanthosh96 3 ай бұрын
It says streamlit-authenticator has no attribute 'hasher' What to do ?
@CodingIsFun
@CodingIsFun 3 ай бұрын
Shortly after releasing the video, the streamlit-authenticator package got updated. The new version is incompatible with the syntax I have shown in the video. If you want to follow along with the video, please use version 0.1.5 : pip install streamlit-authenticator==0.1.5
@jordanbbx7736
@jordanbbx7736 2 ай бұрын
Can you make another vid of the same topic with the updated version?​@@CodingIsFun
@swahiliicttutorials5568
@swahiliicttutorials5568 Жыл бұрын
i wish you could use a database because in real world, users are in the database
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching. Here you are: kzfaq.info/get/bejne/m6mSe5WftbKdo4k.html
@user-gn4dx8ij6u
@user-gn4dx8ij6u Жыл бұрын
something is off here, the code does not match the current state of streamlit design
@CodingIsFun
@CodingIsFun Жыл бұрын
Please read the pinned comment, thanks
@diegosantosmoto
@diegosantosmoto 2 жыл бұрын
👏👏👏🇧🇷🇧🇷🇧🇷
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thank you! Greetings to Brazil! 👋
@diegosantosmoto
@diegosantosmoto 2 жыл бұрын
@@CodingIsFun always a great content! Greetings from 🇧🇷 Brazil
@prasadsaitavadekar
@prasadsaitavadekar Жыл бұрын
is there any option for forgot password or reset password?
@CodingIsFun
@CodingIsFun Жыл бұрын
Yes, with the new release: github.com/mkhorasani/Streamlit-Authenticator#4-creating-a-password-reset-widget
@prasadsaitavadekar
@prasadsaitavadekar Жыл бұрын
@@CodingIsFun Small video on this would be great, Thank You.
@CodingIsFun
@CodingIsFun Жыл бұрын
@@prasadsaitavadekar If I find the time, I will do it
@psg3127
@psg3127 Жыл бұрын
@@CodingIsFun i cannot make this work so indeed it would be fantastic to have a video on this. thanks !
@suthanchandru5412
@suthanchandru5412 Жыл бұрын
How to add logout bro….
@CodingIsFun
@CodingIsFun Жыл бұрын
It's explained in the video
@TheAlucarb
@TheAlucarb Жыл бұрын
i did all the steps but says inccorect password even thou is the correct one
@CodingIsFun
@CodingIsFun Жыл бұрын
Hard to tell from a distance. Sorry, that I cannot help you.
@TheAlucarb
@TheAlucarb Жыл бұрын
@@CodingIsFun thanks anyways, i belive is the pickle file maybe the program is not reading it
@thanglt
@thanglt Жыл бұрын
Great video. I don't know how to reset the password and update it to hashed_pw.pkl ' file?
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching. Please check out the provided examples on GitHub: github.com/mkhorasani/Streamlit-Authenticator Happy Coding!
@thanglt
@thanglt Жыл бұрын
@@CodingIsFun Thank you very much!
@PollynzDataTech
@PollynzDataTech Жыл бұрын
Thank youfor the well detailed video. I tried it but I am getting this error "TypeError: __init__() got multiple values for argument 'cookie_expiry_days" can anyone help me please. Thank you
@CodingIsFun
@CodingIsFun Жыл бұрын
Thanks for watching. Please have a look at the pinned comment.
@MStConsultancy
@MStConsultancy Жыл бұрын
Sorry, but what you showed didn't worked at all. Check out the authentication lib of streamlib. The function requires a completely different format of the credential then you showed...
@CodingIsFun
@CodingIsFun Жыл бұрын
Read the pinned post, thanks!
@MStConsultancy
@MStConsultancy Жыл бұрын
@@CodingIsFun Post a new video since your current instruction is pretty missleading.
@CodingIsFun
@CodingIsFun Жыл бұрын
@@MStConsultancy ok boss!
@pmshadow
@pmshadow Жыл бұрын
@@CodingIsFun thanks for the video and remember: don't feed the trolls :)
@shakyaditasonawane6532
@shakyaditasonawane6532 Жыл бұрын
TypeError: Authenticate.__init__() got multiple values for argument 'cookie_expiry_days'???? what to do???
@CodingIsFun
@CodingIsFun Жыл бұрын
Please read the pinned comment. Thanks
@oumaimaechbicheb8605
@oumaimaechbicheb8605 2 жыл бұрын
hey , Great video thank u i was looking for this. I wonder if i could contact you , i have some questions to ask. thank u
@CodingIsFun
@CodingIsFun 2 жыл бұрын
Thanks for watching. I have already received your email.
@mohammadrasel1008
@mohammadrasel1008 2 жыл бұрын
TypeError: __init__() got multiple values for argument 'cookie_expiry_days' #whats the problem
@CodingIsFun
@CodingIsFun 2 жыл бұрын
I cannot replicate this error. Everything works as expected when I clone the Github repo and run the project with the version specified in the requirements.txt file.
@estudandodados
@estudandodados 2 жыл бұрын
@@CodingIsFun the same error with me Authenticate.__init__() got multiple values for argument 'cookie_expiry_days'. I believe the signature was different from method Authenticate(credentials: dict, cookie_name: str, key: str, cookie_expiry_days: int = 30, preauthorized: list = None)
@CodingIsFun
@CodingIsFun 2 жыл бұрын
@@estudandodados Thanks for watching. Shortly after releasing the video, the package got updated and is not compatible with the syntax I have shown in the video. If you want to follow along with the video, please use version 0.1.5 👉 "pip install streamlit-authenticator==0.1.5"
@KumarHemjeet
@KumarHemjeet 2 жыл бұрын
@@CodingIsFun It would be great if you make the updated video on this.
@CodingIsFun
@CodingIsFun 2 жыл бұрын
@@KumarHemjeet Agree, but I might wait until this package is more stable. Otherwise, I might end up updating videos after every major release
Streamlit Elements You Should Know About in 2023
14:31
Mısra Turp
Рет қаралды 88 М.
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 22 МЛН
He sees meat everywhere 😄🥩
00:11
AngLova
Рет қаралды 10 МЛН
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 14 МЛН
How to create a Streamlit Multi-Page Web App
6:23
Coding Is Fun
Рет қаралды 144 М.
Secure Login System in Python
14:43
NeuralNine
Рет қаралды 101 М.
The Streamlit Epic Overview (part 1/2)
13:06
Fanilo Andrianasolo
Рет қаралды 51 М.
How to Convert a Streamlit App to an .EXE Executable
8:20
Fanilo Andrianasolo
Рет қаралды 39 М.
Deploy Your AI Streamlit App for FREE | Step-by-Step (Heroku Alternative)
30:10
Alejandro AO - Software & Ai
Рет қаралды 15 М.
My Workflow for Building any Streamlit Dashboard Project
9:40
Fanilo Andrianasolo
Рет қаралды 71 М.
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 22 МЛН