Okay, so I wrote an API using Flask-Restful and now I want to implement OAuth2 authorization.
I've tried pyoauth2, but it's undocumented and the tutorial is quite complicated.
So, my question is: How do I do that?
Follow the flask-oauthlib guide to get a basic endpoint set up. Ensure that it works with a vanilla flask endpoint.
Configure your API to use the oauth decorator.
oauth = OAuth2Provider(app)
api = restful.Api(app, decorators=[oauth.require_oauth('email')])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With