flask-dance
flask-dance copied to clipboard
Custom providers example
I was taking a look at https://flask-dance.readthedocs.io/en/latest/providers.html#custom and one thing I noticed is that contrary to the built-in providers we don't create a LocalProxy
there for the session object so people can use it.
I'm wondering if we should add that and explain how that works. Would make it mostly identical to all the other examples we have of how to use the providers.
We could definitely add that, but I'm concerned that people would not understand how it works and would just get more confused. Importing a blueprint
object that you've created in your project is pretty straightforward. Importing a LocalProxy
and trying to figure out when it's OK to use it is less straightforward. Granted, people already need to do that with the LocalProxy
s provided by Flask-Dance, but Flask already provides some precedent for that with the Flask.request
object.
Would you like to make a pull request for this documentation change, so that we can discuss it there?
I know this is an old thread, and this comment may not be exactly on topic, but I'm trying to setup a custom provider and am having issues. The authentication is going through just fine, but I'm using Session storage, and when I do a bluebrint.session.get(url)
I get a response back saying that the request is not authenticated. Am I missing a step here related to LocalProxy, or is this an unrelated problem?