Questions tagged [flask-login]

Flask-Login provides user session management for the python web framework Flask.

Flask-Login provides user session management for the web framework Flask. It handles the common tasks of logging in, logging out, and remembering your users' sessions over extended periods of time.

Flask-Login is not bound to any particular database system or permissions model. The only requirement is that your user objects implement a few methods, and that you provide a callback to the extension capable of loading users from their ID.

It will:

  • Store the active user’s ID in the session, and let you log them in and out easily.
  • Let you restrict views to logged-in (or logged-out) users.
  • Handle the normally-tricky “remember me” functionality.
  • Help protect your users’ sessions from being stolen by cookie thieves.
  • Possibly integrate with Flask-Principal or other authorization extensions later on.

However, it does not:

  • Impose a particular database or other storage method on you. You are entirely in charge of how the user is loaded.
  • Restrict you to using usernames and passwords, OpenIDs, or any other method of authenticating.
  • Handle permissions beyond “logged in or not.”
  • Handle user registration or account recovery.

For detailed information and examples, visit the flask-login documentation.

See also the official Github page.

879 questions
-2
votes
1 answer

Flask login without database

I need to implement a simple login functionality to one of the applications that I a working on using flask-login. The authentication checking is hardcoded if condition and it is validating whether username password equals to a string given. The…
Happy Coder
  • 3,246
  • 9
  • 47
  • 108
-2
votes
1 answer

Getting details of user without login in flask?

I am new to the flask so I need your help on below query- I created an Flask application and now I want to get the information of user who opened my website? I am not intrested to create any login page or save user information in database. So it…
Amit Moghe
  • 39
  • 5
-2
votes
1 answer

Getting current user from Flask app and using in Dash app

So i'm very new to Flask, Dash and Python in general I'm currently busy with a project that requires a Dash Graph to be created from statistics within a MySQL DB. I've already build the login system etc in a normal Flask app and am currently…
-2
votes
1 answer

how to use two kinds of users with the current_user function on the flask_login library?

I try to build an flask app that uses two kind of users and I want to use the current_user separate between the two classes. I need to make the load_user return normal user or delivery user. here's the load user function: @login.user_loader def…
-2
votes
1 answer

reset the password in flask-python

I'm new to Python-Flask. My problem is I'm not sure how to reset the password. Can anyone give the sample code or suggest an idea. Here is orm.py class Enduser(Base): __tablename__='enduser' name=Column(String(50)) …
-2
votes
1 answer

One login using flask

I have a flask app with a login page and connected to MySql. I usually run it on my localhost using chrome. My login's works fine. Now what i want is if i login into my app on a chrome it works fine simultaneously when i opened my app in another…
Ashok
  • 35
  • 1
  • 8
-2
votes
1 answer

How to expire an otp after a certain time- Flask Python

I am developing a web app using flask. In the web app's login page I'm sending One Time Password(otp) to the user generated using pyotp module and storing it in the database. My problem is that, I want to expire the otp after say 30 minutes if the…
-2
votes
1 answer

Show That User Is Logged Into iOS app

The login works from the backend and it goes to the home screen after login on iOS. But how do I do guarantee that the user is actually being logged in? For example, I have a Label that I would like the user's username to be displayed in, but I…
GangstaGraham
  • 7,425
  • 11
  • 39
  • 54
1 2 3
58
59