quoid / userscripts

An open-source userscript manager for Safari
https://quoid.github.io/userscripts/
GNU General Public License v3.0
3.26k stars 184 forks source link

Support GitHub Private Repositories sync integration #521

Open ACTCD opened 1 year ago

ACTCD commented 1 year ago

Just to record some key points and ideas, no promises, no estimated time.

peanball commented 1 year ago

I would still add an option to declare bearer tokens into the script metadata. From a "load and install the script" perspective this is easier, but has potential security implications. For security's sake, there could also just be the indication for a prompt to add an auth token?

Regarding keychain: I'm reasonably certain that Firefox allows using the user's current auth state (including SSO cookies) available in the current browser window to be used for user script installation and possibly update. Safari is likely more stringent with what web extensions may do. The keychain sounds like a good and safe alternative.

ACTCD commented 1 year ago

@peanball It looks like you are still stuck in the previous issue. Maybe it's just that I haven't articulated our vision clearly. If the feature is implemented as a separate integration, we need to consider more.

Instead of expecting the user to manually generate a token and fill it in somewhere, we should probably use the more common jump authorization login method to automatically complete the token passing. That is to say, the user will only see the GitHub standard authorization page, and click the button to complete the authorization.

To be more clear, this issue describes implementing more like a standalone GitHub Apps client, rather than achieving that through some tricky means, which is considered from the perspective of security and best practices.

That said, we won't consider sharing user page login status, we won't use URL formats that embed userinfo anywhere, and we won't let users manually add tokens to script metadata. etc. We want users to experience this integration easily and safely if we will provide it.

We will look forward to discussing and presenting ideas from such a perspective. Thanks.

peanball commented 1 year ago

I think it was more that I didn’t consider just GitHub, but other tools where you’d want to give access but not fully public URLs, e.g. some cloud storage, artefact repositories such as Artifactory, Nexus, etc. or other solutions like GitLab, BitBucket, etc.

That is out of scope for this issue though. For the GitHub case I have nothing to add at the moment.