[PR #1089] [MERGED] Switch OAuth flow initialization order #14850

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1089
Author: @bcmmbaga
Created: 8/17/2023
Status: Merged
Merged: 8/17/2023
Merged by: @mlsmaycon

Base: mainHead: set-pkce-default-flow


📝 Commits (1)

  • 53364d5 Switch OAuth flow initialization order

📊 Changes

1 file changed (+8 additions, -10 deletions)

View changed files

📝 client/internal/auth/oauth.go (+8 -10)

📄 Description

Describe your changes

Switches the order of initialization in the OAuth flow within the NewOAuthFlow method. Instead of initializing the Device Authorization Flow first, it now initializes the PKCE Authorization Flow first, and falls back to the Device Authorization Flow if the PKCE initialization fails.

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

🔄 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/1089 **Author:** [@bcmmbaga](https://github.com/bcmmbaga) **Created:** 8/17/2023 **Status:** ✅ Merged **Merged:** 8/17/2023 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `set-pkce-default-flow` --- ### 📝 Commits (1) - [`53364d5`](https://github.com/netbirdio/netbird/commit/53364d5cb3835febe222734480b94fa68c931611) Switch OAuth flow initialization order ### 📊 Changes **1 file changed** (+8 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/auth/oauth.go` (+8 -10) </details> ### 📄 Description ## Describe your changes Switches the order of initialization in the OAuth flow within the `NewOAuthFlow` method. Instead of initializing the Device Authorization Flow first, it now initializes the PKCE Authorization Flow first, and falls back to the Device Authorization Flow if the PKCE initialization fails. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <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 03:06:27 -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#14850