Skip to content

Create a better way to detect GitHub App Auth tokens

Created by: pjlast

As part of https://github.com/sourcegraph/sourcegraph/pull/40664/files , to quiet the warning logs, a naïve way was implemented to detect GitHub App auth tokens by checking if they start with ghu . This may not always be true. GitHub could decide that this is no longer the case at any time (while unlikely, it's best to not get caught off guard).

We need a different way to make sure it is a GitHub App auth token, such as detecting it when it is set by the GitHub App Auth provider.