-
Notifications
You must be signed in to change notification settings - Fork 111
Apply GitHub authentication plugin #604
Conversation
Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
hello, why do we need to refresh the browser ? (on UX it may not be so nice to do that) |
Signed-off-by: Igor Vinokur <ivinokur@redhat.com>
@benoitf I agree that it is not a good UX, but the vscode GitHub PR plugin loads the token from configuration on it's initialisation https://github.com/microsoft/vscode-pull-request-github/blob/6b019aa02b90cc5729f14ba8b98f653b34fa64a6/src/extension.ts#L37 |
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Single User on K8S (minikube v1.1.1) |
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Single User on K8S (minikube v1.1.1) |
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Single User on K8S (minikube v1.1.1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Single User on K8S (minikube v1.1.1) |
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Single User on K8S (minikube v1.1.1) |
❌ E2E Happy path tests failed ❗ See Details
Tested with Eclipse Che Single User on K8S (minikube v1.1.1) ℹ️ |
crw-ci-test |
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che Single User on K8S (minikube v1.1.1) |
Signed-off-by: Mykhailo Kuznietsov <mkuznets@redhat.com> Co-authored-by: Mykhailo Kuznietsov <mkuznets@redhat.com>
What does this PR do?
Add a plugin that authenticates vscode GitHub PR plugin launched in Che-Theia
The plugin calls Che oAuth API service to get the GitHub token. Then it injects it to the user preferences. When the browser page is refreshed the vscode GitHub PR plugin fetches the token and cleans the token from the preferences file.
This works only in single user Che. When eclipse-che/che#15672 is applied the token could be fetched in the multi-user.
What can be improved:
The login actions that provided by the native vscode GitHub plugin are still redirect to the vscode authentication service. To override them we need:
Urihandler
plugin API method: [Plugin-Api] Apply window.registerUriHandler() function eclipse-theia/theia#5119. It is used by the vscode GitHub PR plugin to handle the callback request from authentication server.https://github.com/microsoft/vscode-pull-request-github/blob/ddaa2bcd06ebc931e075cc9cab5a83f683e93e83/src/authentication/githubServer.ts#L177-L179
so we need to propose a PR to the vscode GitHub PR plugin repository that allows to override the authentication urls.
When the steps above are done we can setup the vscode GitHub PR plugin to use Che oAuth service for authentication and get rid of this authentication plugin.
What issues does this PR fix or reference?
eclipse-che/che#14217
Release Notes
Docs PR
eclipse-che/che-docs#1055