Skip to content

Commit

Permalink
Merge pull request #87 from foomo/support-op-connect-server
Browse files Browse the repository at this point in the history
feat(squadron): check for op connect env
  • Loading branch information
franklinkim authored Feb 5, 2024
2 parents e1edb9a + 7980062 commit 030fd4d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions onepassword/onepassword.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ func New(l log.Logger, cache cache.Cache, opts ...Option) (*OnePassword, error)

func (op *OnePassword) IsAuthenticated(ctx context.Context) (bool, error) {
var sessChanged bool

if os.Getenv("OP_CONNECT_TOKEN") != "" && os.Getenv("OP_CONNECT_HOST") != "" {
return true, nil
}

sess := os.Getenv("OP_SESSION_" + op.cfg.Account)

// check for enabled cli integration
Expand Down

0 comments on commit 030fd4d

Please sign in to comment.