Questions tagged [flask-security]

Flask-Security is a Flask extension which adds basic security and authentication features to your Flask apps quickly and easily. It additionally bootstraps your application with various views for handling its configured features to get you up and running as quick as possible.

319 questions
10
votes
3 answers

How to override login of flask-security?

I want to do some customization when a user logs in. The problem is that the project is using flask-security which implicitly handles user login. I want to check some records of users in the database when users log in. How can I override "login"…
arslan
  • 2,034
  • 7
  • 34
  • 61
10
votes
1 answer

flask-security: how to use in blueprint/extension app pattern?

I want to use flask-security. I'm using a template flask app which creates global objects for extensions, and then initialises them when the app is created. e.g. in extensions.py there is code like this: from flask_bcrypt import Bcrypt from…
Tim Richardson
  • 6,608
  • 6
  • 44
  • 71
10
votes
4 answers

AttributeError: type object 'User' has no attribute 'query'

I have a large database built and populated with sqlalchemy (the original - not flask-SQLAlachemy). I would like to add flask-security to the site, and I realize it relies on flask-SQLAlachemy (instead of the original), but it is my understanding…
Mark Hebert
  • 919
  • 1
  • 9
  • 15
10
votes
1 answer

Difficulty with Celery: function object has no property 'delay'

I have been churning through the software development recently and have had some success bending celery to my will. I have used it successfully to send emails, and have just tried to use almost exactly the same code (after restarting all processes…
rob123
  • 493
  • 1
  • 4
  • 14
10
votes
2 answers

Combining Flask-restless, Flask-security and regular Python requests

My goal is to provide a REST API to my web application. Using: Python 2.7.5 Flask==0.10.1 Flask-Restless==0.13.1 Flask-Security==1.7.3 I need to secure access to my data for both web and REST access. However, I am unable to get any regular python…
Nic
  • 3,365
  • 3
  • 20
  • 31
9
votes
3 answers

How to override Flask-Security default messages?

Flask-Security takes a lot of the grunt work out of authentication and authorization for Python Flask web application development. I've run into one snag, though. On the login page, messages are flashed in response to various invalid inputs.…
Steve Saporta
  • 4,581
  • 3
  • 30
  • 32
9
votes
1 answer

Flask-Admin & Authentication: "/admin" is protected but "/admin/anything-else" is not

I'm trying to customize my Admin views with Flask and Flask-SuperAdmin, however, the index view and subviews are apparently not using the same is_accessible method: EDIT: I managed to figure out what I was doing wrong. I needed to define…
Brian
  • 555
  • 4
  • 18
8
votes
1 answer

Difference between python 2.7 and 3.3+ when importing in __init__.py and module from same directory

Recently I had an issue where a signal I was using from flask-security was not behaving as expected in python 3.3. In looking at the source code for flask-security I noticed that the signal I was importing from a module in the flask-security…
khammel
  • 2,047
  • 1
  • 14
  • 18
8
votes
4 answers

flask-security login via username and not email

I wanted to have the field in User model that through it the user logs in as username instead of email I defined: app.config['SECURITY_USER_IDENTITY_ATTRIBUTES'] = 'username' But I'm still getting: user_datastore.add_role_to_user(name, 'mgmt') …
Boaz
  • 4,864
  • 12
  • 50
  • 90
8
votes
2 answers

Unique Salt per User using Flask-Security

After reading here a bit about salting passwords, it seems that it's best to use a unique salt for each user. I'm working on implementing Flask-Security atm, and from the documentation it appears you can only set a global salt: ie…
Chockomonkey
  • 3,895
  • 7
  • 38
  • 55
8
votes
2 answers

How to run custom code at login with flask-security

I am new to flask, but moderately proficient in python - I have a flask app that uses flask-security for user authentication. I would like to add some additional functionality to the user login process. Specifically, I need to save the user's…
domoarigato
  • 2,802
  • 4
  • 24
  • 41
8
votes
1 answer

Using Flask-Social with Oauth Provider(s) Only, No Local Registration/Login Forms

Is it possible to use Flask-Social and Flask-Security if I only want to use Facebook Login, for example, for user registration and login, i.e. no local registration/login forms? I looked through the Flask-Social example application and documentation…
user981023
  • 243
  • 1
  • 2
  • 13
7
votes
3 answers

How to encrypt password using Python Flask-Security using bcrypt?

I'm trying to utlise the standard basic example in the docs for Flask-Security and have made it work except for the password being stored in plaintext. I know this line: user_datastore.create_user(email='matt@nobien.net', password='password') I…
Johnny John Boy
  • 3,009
  • 5
  • 26
  • 50
7
votes
2 answers

FlaskWTFDeprecationWarning with Flask_Security

I am received a warning every time I use Flask Security. FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. Is this an issue with Flask Security or something I could address myself? I am using…
user6723321
7
votes
2 answers

Override Flask-Security's /login endpoint

I'm working on a site where the users login via OAuth, not a password-based system. Because of this, Flask-Security's default login page doesn't actually work for my use case, because I need the /login endpoint for the OAuth setup. I was able to…
RPiAwesomeness
  • 5,009
  • 10
  • 34
  • 52
1
2
3
21 22