Skip to content

vsce: implement access token sidebar view

Administrator requested to merge tjk/vsce-auth into main

Created by: tjkandala

Add access token sidebar view for VSCE v1. Fixes issues from the preview release like accepting bad tokens (caused by my spaghetti code), reloading without user consent.

CTA (initial)
Form
Loading

Videos

  • Success flow

https://user-images.githubusercontent.com/37420160/150660560-bf9f853b-0a6e-4e7c-bafc-86d2bfcee0d3.mov

  • Failure flow

https://user-images.githubusercontent.com/37420160/150660595-1c3e4270-bacf-4010-b639-25be1c783948.mov

Notes

  • Why is there a notification on the bottom right? To let the user know to update their token in case it is invalidated between sessions.
  • Why do we want users to reload the window? We dispose all resources and prevent API requests on settings (either URL or access token) changes to prevent any private data (like repo names) from being sent to other instances. I included access tokens since theoretically a user could have opened a private repo while authenticated, then removed their access token to "log out", but I don't know if that's really a vulnerability. If we think that reloading is really inconvenient, we can make that a requirement only for instance change, not access token change.
  • Next steps (1 step per PR): Implement search UI, implement remote file browsing, add code intel/Sourcegraph extensions, pings/analytics.

Merge request reports

Loading