Skip to content

Commit

Permalink
remove keyring type
Browse files Browse the repository at this point in the history
  • Loading branch information
alldoami committed Jan 10, 2025
1 parent 858b7c6 commit aff5907
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions oidc_cli/oidc_impl/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/chanzuckerberg/go-misc/pidlock"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/zalando/go-keyring"
)

// Cache to cache credentials
Expand Down Expand Up @@ -97,7 +96,9 @@ func (c *Cache) refresh(ctx context.Context) (*client.Token, error) {

err = c.storage.Set(ctx, compressedToken)
if err != nil {
if errors.Is(err, keyring.ErrSetDataTooBig) {
if err.Error() == "could not set value to keyring: data passed to Set was too big" {
// TODO: Upgrade keyring library to v0.2.2 to use ErrSetDataTooBig
// if errors.Is(err, keyring.ErrSetDataTooBig) {
logrus.Debug("Token too big, removing refresh token")
strToken, err := token.Marshal(append(c.storage.MarshalOpts(), client.MarshalOptNoRefresh)...)
if err != nil {
Expand Down

0 comments on commit aff5907

Please sign in to comment.