hyperlog-core / hyperlog-backend

Backend for hyperlog
0 stars 0 forks source link

Add switch on connect_github for public and private repos #98

Closed BrainBuzzer closed 4 years ago

BrainBuzzer commented 4 years ago

Due to the current permissions requested on the GitHub end of the application(read and write access to private and public repos) many people don't connect their GitHub. So there needs to be a switch at connect_github endpoint which allows users to set the scope to just public_repo rather than repo unless requested explicitly.

BrainBuzzer commented 4 years ago

Try taking on this on both frontend and backend. It might be a good exercise to know how the flow should be.

nikochiko commented 4 years ago

Definitely.

Here's how I imagine it:

BrainBuzzer commented 4 years ago

This one still involved getting to the backend to choose. Instead, backend only redirects the user to GitHub connection page directly. To do so, have a toggle on frontend that allows user to choose between selecting private repos and public repos. The link will change as per the toggle where connect_github will be passed additional scope if the user says ask for private repos too.

nikochiko commented 4 years ago

Okay that works too. So for the first point, I'll just add the ui on the frontend and then the redirect to /connect_github to already have repos_scope=full or repos_scope=public.