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.
Questions tagged [flask-security]
319 questions
0
votes
1 answer
Flask-security Flask-login | login as a user before first request
I am trying to login as a user as soon as I start the server. I am using flask-security which uses flask-login to handle users log in and out.
I attempted this:
Code:
@app.before_first_request
def login_user():
…

David Gonzalez
- 37
- 7
0
votes
1 answer
No CSS and JS, when slash at the end
Views.py
@app.errorhandler(404, strict_slashes=False)
def page_not_found(e):
return render_template('404.html', e=e)
404.html
{% extends 'layouts/layout1.html' %}
{% block title %}404 Page Not Found
{% endblock title %}
{% block content %}
…

Rahul Bali
- 692
- 10
- 28
0
votes
1 answer
Error extending RegisterForm in flask-security
I am experiencing difficulty extending the registration aparatus of flask-security.
I have extended the RegisterForm:
class ExtendedRegisterForm(RegisterForm):
payroll_no = IntegerField('Payroll Number',…

rob123
- 493
- 1
- 4
- 14
0
votes
0 answers
flask-security unable to send email
When I try to send email using flask-security it takes a while and then fails with following error on the screen
Something went wrong !
Server timed out or sent incomplete response
Click here to try again. (Perhaps you meant to use HTTPS instead of…

afsar
- 69
- 1
- 9
0
votes
1 answer
Flask-WTF with Flask-security
@user.route('/', methods=['POST'])
def create():
form = CreateUserForm()
if form.validate_on_submit():
user_datastore.create_user(form)
Using both libraries together, is there some way that I can do as in the code above. I want to…

rablentain
- 6,641
- 13
- 50
- 91
0
votes
1 answer
Flask-Security reset password
I'm trying to use Flask-Security on a project. I've made may search on SO but I just can't find a way to simply implement a the reset password functionality. I just don't understand how to use the flask-security APi in this case.
I notice that all…

Keuha
- 295
- 3
- 18
0
votes
1 answer
Why does my pip install flask-security keep downloading the wrong project code?
Recently, flask-security had been breaking due to an upgrade to Flask-Login 0.3. the problem lies from a method definition to a property definition of is_active() and is_authenticated() to is_active and is_authenticated respectively. This change is…

Dan Rubio
- 4,709
- 10
- 49
- 106
0
votes
1 answer
why does flask-security redirect to unauthorized view
I'm giving flask-security a go...it has a lot of nice pieces to it. I ran into some quirky behavior though that I don't really understand. From the code I looked at it looks very intentional that the code works the way it does, but I can't…

lostdorje
- 6,150
- 9
- 44
- 86
0
votes
1 answer
Flask-Security modify register form post validation
I am using Flask-WTF and WTForms and I have a form which looks like this:
class RegForm(ConfirmRegisterForm):
code = TextField('Invite Code', [Required(), validate_code])
I am using Flask-Security and this is my registration form. On my model,…

Nik Barres
- 523
- 1
- 8
- 18
0
votes
1 answer
How override fields of the registration form in Flask-Security?
How do I override the default registration form in Flask-Security is to remove all label attributes.
In the documentation there is a section of the customizing view, but in the example is to add the fields to the form, and I need to change the…

user3419632
- 33
- 1
- 8
0
votes
1 answer
Offer a token protected file from flask using angular
I have a file, served with flask, protected with token based
authentication.
I want to offer a download to it from an angular app
the token is stored in the angular session and put into the header of each $http.get or post
But when I just…

Sebastian
- 5,471
- 5
- 35
- 53
0
votes
1 answer
Flask: Connecting models to files, e.g. profile pictures
If it matters, I use Flask-Security, Flask-SQLAlchemy and Flask-Admin in my application.
How should I design my application so that I can connect a row in the database with one or more files, e.g. a user to their profile pictures?

damd
- 6,116
- 7
- 48
- 77
0
votes
2 answers
Flask Security - TemplateAssertionError: no filter named 'urlencode'
I just added flask-security to my flask project. It works locally, but reports this error on OpenShift:
TemplateAssertionError: no filter named 'urlencode'
I don't know if it is some wrong library version, or how to debug this. This is my setup.py…

Ognjen
- 2,508
- 2
- 31
- 47
0
votes
1 answer
Flask-security - how to get form data in user_registered signal?
I started here, and now I have this code:
@user_registered.connect_via(app)
def user_registered_sighandler(sender, **extra):
sender.logger.debug("logger-user_registered_sighandler:", extra)
user = extra.get('user')
print dir(sender)
…

cyberra
- 579
- 1
- 6
- 14
0
votes
1 answer
Flask-Security. Converting datetime(2014, 5, 31, 23, 46, 38, 559513) to python format datetime(2014-5-31, 23:46:38.559513)
I am using Flask-Security and everything works fine, except the email confirmation link. Clearly, when a user registers he recieves an email with the link to confirm the email, so when he/she clicks on the link my application gives an SQL datetime…

Max
- 2,425
- 6
- 35
- 54