Skip to content

Commit

Permalink
Reverting erroneous change
Browse files Browse the repository at this point in the history
  • Loading branch information
willvedd authored and sergiught committed Dec 9, 2022
1 parent abaf51e commit a0a35bf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions internal/auth/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ func (t *TokenRetriever) Delete(tenant string) error {
// The request is used the default client_id and endpoint for device authentication.
func (t *TokenRetriever) Refresh(ctx context.Context, tenant string) (TokenResponse, error) {
// get stored refresh token:
// refreshToken, err := t.Secrets.Get(SecretsNamespace, tenant)
// if err != nil {
// return TokenResponse{}, fmt.Errorf("cannot get the stored refresh token: %w", err)
// }

refreshToken := "fadsfasdf"
refreshToken, err := t.Secrets.Get(SecretsNamespace, tenant)
if err != nil {
return TokenResponse{}, fmt.Errorf("cannot get the stored refresh token: %w", err)
}
if refreshToken == "" {
return TokenResponse{}, errors.New("cannot use the stored refresh token: the token is empty")
}
Expand Down

0 comments on commit a0a35bf

Please sign in to comment.