Here is my scenario used in the extension Docs-validation
:
We provide a sign-in button inside the VS CODE, when the user clicks that button, we will redirect the user to a browser to do the auth, after that, an auth token will be sent back to the extension, which will be used to call our backend API.
The main logic can be found in this file
Actually, this is inspired by the built-in sign-in experience of the VS Code and some extension with a sign-in experience like azure-cli
, you can see from here:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…