Skip to content

[client] Add FreeBSD desktop client support to OAuth flow #3822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 14, 2025

Conversation

hakansa
Copy link
Member

@hakansa hakansa commented May 14, 2025

Describe your changes

[client] Add FreeBSD desktop client support to OAuth flow

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

@Copilot Copilot AI review requested due to automatic review settings May 14, 2025 10:50
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds FreeBSD desktop client support to the OAuth flow by introducing a new boolean parameter and relevant checks across several client components.

  • New parameter and environment check for FreeBSD desktop clients in OAuth flow initialization
  • Updates to proto definitions and client-side logic for iOS, Android, and command-line login support

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
client/server/server.go Updated OAuth flow initialization to include FreeBSD desktop client support
client/proto/daemon.proto Added isFreeBSDDesktopClient field to the LoginRequest message
client/ios/NetBirdSDK/client.go Adjusted OAuth flow call to include FreeBSD desktop support parameter
client/internal/auth/oauth.go Modified NewOAuthFlow to handle FreeBSD environment checking
client/cmd/login.go Added function isFreeBSDRunningDesktop and updated login commands to support FreeBSD
client/android/login.go Included FreeBSD parameter in OAuth flow initialization for consistency

@avg-I
Copy link

avg-I commented May 14, 2025

I am curious if the additional parameter for FreeBSD desktop is really needed.
It seems that desktop detection and handling is totally identical between Linux and FreeBSD.
So, could they just use the same "is(Unix)Desktop" flag?

@hakansa
Copy link
Member Author

hakansa commented May 14, 2025

I am curious if the additional parameter for FreeBSD desktop is really needed. It seems that desktop detection and handling is totally identical between Linux and FreeBSD. So, could they just use the same "is(Unix)Desktop" flag?

@avg-I what about Wayland? Haven't used it before. So I'm not sure if it's being used widely.

@avg-I
Copy link

avg-I commented May 14, 2025

@avg-I what about Wayland? Haven't used it before. So I'm not sure if it's being used widely.

@hakansa I think that there should not be any difference between Linux and FreeBSD either.
I.e., the DESKTOP / XDG checks should be sufficient for most desktop environments.
If you want to double-check based on DISPLAY / WAYLAND_DISPLAY (e.g., for people running some minimalist graphic setup), then I do not see a reason to not do that on Linux as well.

@hakansa
Copy link
Member Author

hakansa commented May 14, 2025

@avg-I well let's use the same parameter for now, we might need to seperate them for other OS'es in future, no need for now.

Copy link

@hakansa hakansa merged commit 92c91bb into main May 14, 2025
32 checks passed
@hakansa hakansa deleted the fix/freebsd-desktop branch May 14, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants