Open cesarqdt opened 10 months ago
Disclaimer: There might still be a bug but...
If you use create_client()
which both creates and gets a client (comments in the code "Create or get the given named OAuth client") then you can call/use both clients, at least what it looks like for me.
Example code:
client = oauth.create_client("client_1")
client.authorize_access_token()
This way you can consolidate the code to:
@app.route('/login/<client_name>')
def client_login(client_name):
client = oauth.create_client(client_name)
client.authorize_access_token()
...
Describe the bug
When there are more than 1 oauth client to connect (registered as oauth.register(...)), the application always picks the last one in the definition instead of any of the defined ones. There should be a way to keep every client registered and usable in subsequent calls.
Follow this example:
Error Stacks when someone accesses route client_1/login, an error will raise with the following traceback:
To Reproduce
Create a simple app and register two OAuth clients globally.
Expected behavior Try accessing any route where the first client is required.
Environment: