[PR #433] [MERGED] Support Generic OAuth 2.0 Device Authorization Grant #12623

Closed
opened 2026-08-05 02:06:18 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/433
Author: @braginini
Created: 8/22/2022
Status: Merged
Merged: 8/23/2022
Merged by: @braginini

Base: mainHead: oidc-device-grant


📝 Commits (10+)

  • ee28d0e Add OIDCConfigEndpoint to Management DeviceAuth API
  • ba5e892 Merge remote-tracking branch 'origin/main' into oidc-device-grant
  • f9aace9 Merge main
  • a989c9c Make use of OIDCConfiguration
  • 186880b Fix compilation error
  • 3310f40 Use provided Token and DeviceAuth endpoints instead of fetching OIDC config
  • ce4b307 Fix oauth tests
  • 28664bf Use form data instead of JSON to request device code
  • ab67ed6 Fix Auth flow for Auth0
  • 3318d46 Add DeviceAuth endpoint and TokenEndpoints to the management configs

📊 Changes

11 files changed (+309 additions, -322 deletions)

View changed files

📝 client/cmd/login.go (+2 -1)
📝 client/internal/config.go (+11 -4)
📝 client/internal/oauth.go (+82 -109)
📝 client/internal/oauth_test.go (+40 -160)
📝 client/main.go (+1 -2)
📝 client/server/server.go (+2 -1)
📝 management/cmd/management.go (+87 -0)
📝 management/proto/management.pb.go (+65 -40)
📝 management/proto/management.proto (+6 -1)
📝 management/server/config.go (+7 -0)
📝 management/server/grpcserver.go (+6 -4)

📄 Description

Support Generic OAuth 2.0 Device Authorization Grant
as per RFC specification https://www.rfc-editor.org/rfc/rfc8628.
The previous version supported only Auth0 as an IDP backend.
This implementation enables Interactive SSO Login feature for any IDP compatible with the specification, e.g., Keycloak.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/433 **Author:** [@braginini](https://github.com/braginini) **Created:** 8/22/2022 **Status:** ✅ Merged **Merged:** 8/23/2022 **Merged by:** [@braginini](https://github.com/braginini) **Base:** `main` ← **Head:** `oidc-device-grant` --- ### 📝 Commits (10+) - [`ee28d0e`](https://github.com/netbirdio/netbird/commit/ee28d0e4abd9966299419af649c908255f984774) Add OIDCConfigEndpoint to Management DeviceAuth API - [`ba5e892`](https://github.com/netbirdio/netbird/commit/ba5e89220b4f0675bc58d918d6f4c6411cd4dbeb) Merge remote-tracking branch 'origin/main' into oidc-device-grant - [`f9aace9`](https://github.com/netbirdio/netbird/commit/f9aace9774b30d745706d69eb234b7440f299394) Merge main - [`a989c9c`](https://github.com/netbirdio/netbird/commit/a989c9c309f94139f960d514b88770f20eb129d6) Make use of OIDCConfiguration - [`186880b`](https://github.com/netbirdio/netbird/commit/186880b6f41b67fd46e6469b1f5fecefc1b65431) Fix compilation error - [`3310f40`](https://github.com/netbirdio/netbird/commit/3310f408dcea6bfcb2323a160045957dc589dd56) Use provided Token and DeviceAuth endpoints instead of fetching OIDC config - [`ce4b307`](https://github.com/netbirdio/netbird/commit/ce4b30718186c693b246e6fed9dc9ef2407163b5) Fix oauth tests - [`28664bf`](https://github.com/netbirdio/netbird/commit/28664bf24141506bf579ec82c74d3c2cf67d3403) Use form data instead of JSON to request device code - [`ab67ed6`](https://github.com/netbirdio/netbird/commit/ab67ed65fc9ea0608d735f071e9be9a2a8a0658f) Fix Auth flow for Auth0 - [`3318d46`](https://github.com/netbirdio/netbird/commit/3318d465c7ef8139b767eb34e8eca59ef58eae9a) Add DeviceAuth endpoint and TokenEndpoints to the management configs ### 📊 Changes **11 files changed** (+309 additions, -322 deletions) <details> <summary>View changed files</summary> 📝 `client/cmd/login.go` (+2 -1) 📝 `client/internal/config.go` (+11 -4) 📝 `client/internal/oauth.go` (+82 -109) 📝 `client/internal/oauth_test.go` (+40 -160) 📝 `client/main.go` (+1 -2) 📝 `client/server/server.go` (+2 -1) 📝 `management/cmd/management.go` (+87 -0) 📝 `management/proto/management.pb.go` (+65 -40) 📝 `management/proto/management.proto` (+6 -1) 📝 `management/server/config.go` (+7 -0) 📝 `management/server/grpcserver.go` (+6 -4) </details> ### 📄 Description Support Generic OAuth 2.0 Device Authorization Grant as per RFC specification https://www.rfc-editor.org/rfc/rfc8628. The previous version supported only Auth0 as an IDP backend. This implementation enables [Interactive SSO Login](https://netbird.io/docs/getting-started/installation#running-netbird-with-sso-login) feature for any IDP compatible with the specification, e.g., Keycloak. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:06:18 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#12623