add verify check (#3079)

This commit is contained in:
ahrav
2024-07-19 18:09:26 -07:00
committed by GitHub
parent 936095b688
commit 7a36e89c61
+5 -3
View File
@@ -68,9 +68,11 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
ClientSecret: secretMatch[1],
TokenURL: github.Endpoint.TokenURL,
}
_, err := config.Token(ctx)
if err != nil && strings.Contains(err.Error(), githubBadVerificationCodeError) {
s1.Verified = true
if verify {
_, err := config.Token(ctx)
if err != nil && strings.Contains(err.Error(), githubBadVerificationCodeError) {
s1.Verified = true
}
}
results = append(results, s1)