Questions tagged [flask-user]
17 questions
6
votes
2 answers
Overriding Flask-User/Flask-Login's default templates
I have found a similar question here, but the answer does not seem to work for me.
I use Flask User (which extends Flask Login, I believe) and for the most part it works very well. I have built my own completely fresh templates for sign in and…

Rob
- 128
- 1
- 7
- 29
2
votes
0 answers
ModuleNotFoundError: No module named 'cryptography.hazmat.bindings._padding'
I have installed the package cryptography using pip in order to use the UserManager class from Flask-User. However, when running my code I get the following error:
File "c:\Users\env\lib\site-packages\cryptography\hazmat\primitives\padding.py", line…

lassel
- 21
- 1
2
votes
2 answers
Flask-User @login_required and @roles_required not working
I am trying to use Flask-User (which incorporates Flask-Login). I would like to use the @login_required and @roles_required decorators to manage access to routes. However, it is not working.
The Flask-User documentation shows login_required being…

Rob
- 128
- 1
- 7
- 29
2
votes
1 answer
using Flask User with Flask Restful
Guys I need to use Flask-RESTful API with Flask-User. The way of using flask restful is below
from flask import Flask
from flask_restful import Resource, Api
app = Flask(__name__)
api = Api(app)
class HelloWorld(Resource):
def get(self):
…

Arsalan Ahmad Ishaq
- 877
- 8
- 15
1
vote
1 answer
No matching distribution found for Flask-User When installing the package
I am trying to install Flask-User package for my project (to use the @roles_required decorator) using pip install Flask-User in my project environment, but am getting this error in windows. Not sure what's wrong since I can just install the package…

peter
- 19
- 2
1
vote
0 answers
Flask_User and Blueprint - how to structure the app?
I am creating my first larger Python Flask app and one of the modules I will be using is Flask_User. To make all a bit more manageable I wanted to impost a blueprint and factory app.
The structure is simple:
app.py
config.py
auth/
…

Hikari_PL
- 21
- 2
1
vote
0 answers
flask-user form customization
Flask-user ResendEmailConfirmationForm form class does not validate the user email (https://github.com/lingthio/Flask-User/blob/master/flask_user/forms.py) as does other class forms such as ForgotPasswordForm, which incorporates the following…

najib
- 11
- 2
0
votes
0 answers
Python - Testing an authenticated user with PyTest/Flask-User
I'm trying to set up pytests for my Flask-User based application but struggling to figure out how to log in as a user to test my routes.
Current test_app.py
import pytest
@pytest.fixture(scope='module')
def app():
from app import create_app
…
0
votes
1 answer
How to handle google sign in flow on flask api rest backend?
Preface:
I known there are a lot of tutorials and answers about this question but i think there is a bit of confusion. My question is not only about some code but instead on architectural choices
Context:
We have an android mobile app and a backend…

notfound404
- 66
- 3
0
votes
0 answers
Trying to install Flask-User getting the following error
ERROR: Could not find a version that satisfies the requirement Flask-User (from versions: 0.3, 0.3.1, 0.3.2, 0.3.3, 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 0.4.7, 0.4.8, 0.4.9, 0.5.0, 0.5.1, 0.5.2, 0.5.3,…

Vi Ki
- 119
- 10
0
votes
0 answers
Python Flask Authorization login_user not working
I have a flask app that acts as a login system. I am trying to use @roles_required() decorator in order to check if the user is an admin, and if they are, giving them access to specific areas.
When I try log in with the correct credentials, that…

lllakkka
- 9
- 3
0
votes
1 answer
Login to Python web app from Lazarus FPC desktop client
I have successfully deployed my Python web app in Pythonanywhere, complete with login authentication using flask-user.
I want to programmatically login to this Python web app from a Lazarus FPC desktop client so I can interact with the API. Of…

JeffP
- 539
- 1
- 5
- 19
0
votes
1 answer
passing dynamic input to flask-user @roles_required decorator
Context:
I want to restrict access to a user's page only to the user. since I wont know the user's names I cant specify their name in the roles_required decorator.
So what im doing at the moment is using flask-user to assign a role to the user and…

RooneyMUFC
- 103
- 2
- 11
0
votes
0 answers
Flask-User with MongoDB Atlas
I'm trying to follow the Flask-User documentation with MongoDB.
However, when I try to connect to my MongoDB Atlas, it's always writing to a "test" database, instead of the one I specify.
I have identified that it is because of the Flask-MongoEngine…

lagrangian_headache
- 129
- 1
- 11
0
votes
1 answer
Flask-User /user/sign-in view, where is it?
This is prolly a stupid question but I am experimenting with Flask-User. I see the venv/.../flask_user/user_manager__settings.py file and see
USER_LOGIN_URL = '/user/sign-in' #:
I do not see a method for this though. Something is rendering a…

7 Reeds
- 2,419
- 3
- 32
- 64