Create instance-wide OAuth application for the Web IDE
Context
In #422131 (closed), the Web IDE uses the OAuth PCKE authorization flow to request an API access token. That workflow relies on creating an instance-wide "trusted" OAuth application that the Web IDE will use to skip the user authorization step.
Problem statement
This instance-wide OAuth application has to be created beforehand. As the documentation explains, instance-wide OAuth applications are created in the instance's admin area. If an instance administrator has to create the OAuth application before users can use the Web IDE, are we introducing a breaking change? Should we create an instance-wide Setting to store the OAuth application's client ID?
Potential solutions
- Find a way of automatically creating the instance-wide OAuth application without user involvement.
Availability and Testing
Add feature specs/ unit tests for the Oauth authentication. Ensure E2E package and test is passing in MRs to ensure no regressions. May need to consider E2E test if adequate feature spec coverage can't be achieved.