Flask-User icon indicating copy to clipboard operation
Flask-User copied to clipboard

Only want to use Flask-User for authorization...and not for authentication. Any suggestions please?

Open rahulj123atwork opened this issue 9 years ago • 1 comments

I already have my app working beautifully with Flask-Login where via the @login_required decorator I have two sets of pages: for_all_users, and second for logged_in_users.

Now, I need to add in authorization. I don't want to replace all my authentication logic in my app. From Flask-User I only want to use the very nice @roles_required decorator functionality.

Is this doable? Any examples? Thank you.

rahulj123atwork avatar Apr 26 '16 03:04 rahulj123atwork

Hi.

Yes.

You just need to make db model compatible with Flask-User, and, for example, inherit from UserManager class and disable Flask-User's views that you don't need.

LotosikRa avatar Oct 30 '16 09:10 LotosikRa