feat(oauth): use oauth device flow to authenticate with predefined src-cli OAuth client by burmudar · Pull Request #1223 · sourcegraph/src-cli

@burmudar self-assigned this

Dec 3, 2025

@burmudar burmudar marked this pull request as ready for review

December 3, 2025 13:37

eseliger

This was referenced

Dec 8, 2025

@burmudar burmudar changed the title feat(auth): use oauth device flow to authenticate with predefined src-cli OAuth client feat(oauth): use oauth device flow to authenticate with predefined src-cli OAuth client

Dec 8, 2025

burmudar

keegancsmith

keegancsmith

@burmudar burmudar marked this pull request as ready for review

February 26, 2026 14:14

keegancsmith

@burmudar

* add refresh to oauthdevice.Client
* oauthdevice: add RefreshToken field and Refresh method

* feat(oauth): Use keyring to store oauth token (#1228)
  * add refresh to oauthdevice.Client
  * add OAuth Transport and use it if no access token
  * secrets: switch to zalando/go-keyring and add context support
  * secrets: scope keyring by endpoint

@burmudar burmudar deleted the wb/add-oauth-device-flow branch

March 9, 2026 10:12

burmudar added a commit that referenced this pull request

Mar 23, 2026
…Auth client (#1223)

* removed unused func

* add refresh token to device response unmarshall

* make NewClient take ClientID as param

* add oauth flow and use oauth token when SRC_ACCESS_TOKEN is empty

* feat(oauth): Add refresh to oauthdevice.Client (#1227)

* add refresh to oauthdevice.Client
* oauthdevice: add RefreshToken field and Refresh method

* feat(oauth): Use keyring to store oauth token (#1228)
  * add refresh to oauthdevice.Client
  * add OAuth Transport and use it if no access token
  * secrets: switch to zalando/go-keyring and add context support
  * secrets: scope keyring by endpoint

(cherry picked from commit 0bc535e)

burmudar added a commit that referenced this pull request

Mar 23, 2026
…Auth client (#1223)

* removed unused func

* add refresh token to device response unmarshall

* make NewClient take ClientID as param

* add oauth flow and use oauth token when SRC_ACCESS_TOKEN is empty

* feat(oauth): Add refresh to oauthdevice.Client (#1227)

* add refresh to oauthdevice.Client
* oauthdevice: add RefreshToken field and Refresh method

* feat(oauth): Use keyring to store oauth token (#1228)
  * add refresh to oauthdevice.Client
  * add OAuth Transport and use it if no access token
  * secrets: switch to zalando/go-keyring and add context support
  * secrets: scope keyring by endpoint

(cherry picked from commit 0bc535e)