Fix github authentication built-in for electron case #13611
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What it does
Add dummy command to fix github authentication built-int flows. Also includes code to consider sessions which are not created, but restored from storage at registration time.
When deploying Theia as a web-app, one would normally use a web application flow (https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#web-application-flow). However, this will not work, because the VSCode extension explicitly restricts the domains for which that flow can be used. Also, we obviously do not know the "client secret" of the VS Code Github ouath app.
Fixes #13599
Partial fix for #12821
Contributed on behalof of STMicroelectronics
How to test
Follow-ups
Make "github" authentication work for the web app case.
Review checklist
Reminder for reviewers