Skip to content

Implement one-click OAuth for code host connections

Created by: quinnkeast

Background

We want to heavily prioritize users using OAuth to connect with code hosts. This is a much faster and more usable approach to creating code host connections (a single click) over access tokens (which require a lot more steps that are unique to each code host), which helps move users forward to adding their own repositories more quickly.

However, we also want to allow users to continue using access tokens for code host connections if they have particular needs that are better addressed with access tokens.

Our design solution needs to create a level of hierarchy between these two connection paths: first, the one-click connection. As an alternative, the access token. The design outcome should present this hierarchy clearly, and not leave users to second-guess which one they should use and why, while also making it easy for users who do want to use access tokens to do so.

Proposal

We've evaluated a few different approaches in design, each with their own strengths and tradeoffs. I'm proposing a solution that uses a common pattern for establishing code host connections with a slight modification to the current UI (which is designed to convey that multiple code host connections are desirable). There's several other approaches that have their own merits, but I'm quickly finding that it'd be best to make a decision to move forward, and then evaluate in testing as part of a complete flow (connecting with code hosts → adding repos → first search).

@artemruts has confirmed that it's a low-risk implementation in that it'll be easy to make adjustments to the UI based on testing.