Grant extensions access to OAuth tokens
Grant specific extensions access to OAuth authentication tokens in Microsoft Visual Studio Code by configuring the trustedExtensionAuthAccess field. Extensions that access services such as GitHub or Microsoft can then authenticate without manual intervention.
Before you begin
- You have an active
ocsession with administrative permissions to the OpenShift cluster. See Getting started with the CLI.
About this task
"trustedExtensionAuthAccess": [
"<publisher1>.<extension1>",
"<publisher2>.<extension2>"
]
Define the variable in the devfile or in a ConfigMap.
Use the trustedExtensionAuthAccess field with caution as it could potentially lead to security risks if misused. Give access only to trusted extensions.
Since the Microsoft Visual Studio Code editor is bundled within che-code image, you can only change the product.json file when the workspace is started up.
Procedure
Results
- Start or restart the workspace and verify that the
trustedExtensionAuthAccesssection is added to theproduct.jsonfile.