Skip to content

Conversation

@lixmal
Copy link
Collaborator

@lixmal lixmal commented Oct 30, 2025

Describe your changes

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)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Copilot AI review requested due to automatic review settings October 30, 2025 10:24
Copy link
Contributor

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 pull request adds support for the login_hint OAuth parameter to improve the authentication user experience by pre-filling email/username fields during login. The implementation retrieves the user's email from the active profile state and passes it to both PKCE and Device Code authentication flows.

  • Adds LoginHint field to authentication provider configurations
  • Implements profileLoginHint() function to retrieve email from active profile state
  • Integrates login_hint parameter into both PKCE and Device Code authentication flows

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
client/internal/pkce_auth.go Added LoginHint field to PKCEAuthProviderConfig struct
client/internal/device_auth.go Added LoginHint field to DeviceAuthProviderConfig struct
client/internal/auth/pkce_flow.go Implemented login_hint parameter in PKCE authorization URL
client/internal/auth/device_flow.go Implemented appendLoginHint() function and integrated it into device flow verification URIs
client/internal/auth/oauth.go Added profileLoginHint() function and integrated it into both authentication flows

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

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.

2 participants