Disable any API exposed by flask-security

781 Views Asked by At

I was trying to implement login functionality in my app. I started with using flask-security for basic api exposed by flask-security like register, login, logout etc.

While doing this, I realised that some of the API's provided by flask-security is not of my use. So for that, I was looking to disable some of the API but didn't get anything related to that.

I saw flask-security-config too, but there is no way to disable API which is exposed by flask-security.

I am new to flask & flask-security & struggled a lot but didn't get sucess. Any useful suggestion will be very helpful.

Thanks!

2

There are 2 best solutions below

3
On

I found out the way to do this.

Follow this link: flask security config to disable API's which you don't want to keep in your application.

0
On

For posterity, you can disable the default flask-security blueprint during the Security object init app.security = Security(app, user_datastore, register_blueprint=False).