-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Description
Is your feature request related to a problem? Please describe.
At this moment it is impossible to disable OAuth flow generation. And that's great that OAuth is implemented. But it has some issues:
- It requires Qt GUI module as per [REQ] Disable generated "oauth" function for cpp-qt-client to remove "QtGui" dependency #16082 request.
- It doesn't handle errors from OAuth auth requests and this leads to a crash.
- Every generated API class has own OauthCredentials object which stores tokens and these objects don't share information between different APIs. This leads to extra auth requests.
- It is impossible to specify your own client id, client secret for client credentials grant type.
Maybe something else. These are the issues I have faced. In my case it would be easier to do authentication manually once and then reuse the token over multiple calls to different APIs. I have to say that some of the issues is easy to fix but some of them requires refactoring (for example sharing credentials).
Describe the solution you'd like
I would like to have a config option to disable generating OAuth code and the main point for me to disable this automatic flow when any HTTP 401 goes via OAuth flow at first and never reaches user code.
Describe alternatives you've considered
- Fixing all the issues looks too complicated to me
- Another option would be to generate an API class method that disables OAuth flow and should be called in advance. This is also possible but this will not remove dependency on Qt Gui.
Additional context
Here I would like to gather opinions and objections about such a feature. I will take care about implementation afterwards.