Offer only Device Code Flow on FreeBSD (#2389)

This commit is contained in:
Evgenii 2024-08-04 21:31:43 +01:00 committed by GitHub
parent 6b930271fd
commit d56dfae9b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,6 +69,11 @@ func NewOAuthFlow(ctx context.Context, config *internal.Config, isLinuxDesktopCl
return authenticateWithDeviceCodeFlow(ctx, config)
}
// On FreeBSD we currently do not support desktop environments and offer only Device Code Flow (#2384)
if runtime.GOOS == "freebsd" {
return authenticateWithDeviceCodeFlow(ctx, config)
}
pkceFlow, err := authenticateWithPKCEFlow(ctx, config)
if err != nil {
// fallback to device code flow