Skip to content

Conversation

@burmudar
Copy link
Contributor

@burmudar burmudar commented Dec 8, 2025

use keyring to store oauth token

add internal/keyring package to use 99designs keyring

  • rename keyring to store
  • make keyring struct src-cli and set label on secret

return Token struct

store token in keyring

create token struct from TokenResponse

  • Token converts expiresIn to a timestamp
  • Store the token with the endpoint suffix

add basic http transport for oauth

OAuth transport and use when available in api client

Test plan

@burmudar
Copy link
Contributor Author

burmudar commented Dec 8, 2025

noToken := cfg.AccessToken == ""
endpointConflict := endpointArg != cfg.Endpoint

secretStore, err := keyring.Open()
Copy link
Member

Choose a reason for hiding this comment

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

you only open this if doing deviceflow. If we are not doing deviceflow don't open secret storage. IE avoid interacting with secret storage unless we actually need to.

Maybe you can add a wrapper around secretstore which lazily opens?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Stop looking over my shoulder :P busy addressing this atm 😄

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