Skip to content

Commit

Permalink
chore(tokens): add log with new encrypted tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont committed Aug 16, 2024
1 parent 20a01dc commit e2c0d87
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/tokens/internal/grpc_impl/grpc_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,14 @@ func (c *tokensGrpcImpl) RequestUserToken(
if err := c.db.WithContext(ctx).Save(&user.Token).Error; err != nil {
return nil, err
}
c.log.Info("user token refreshed", slog.String("user_id", user.ID))

c.log.Info(
"user token refreshed",
slog.String("user_id", user.ID),
slog.Int("expires_in", int(user.Token.ExpiresIn)),
slog.String("access_token", newAccessToken),
slog.String("refresh_token", newRefreshToken),
)
}

decryptedAccessToken, err := crypto.Decrypt(user.Token.AccessToken, c.config.TokensCipherKey)
Expand Down

0 comments on commit e2c0d87

Please sign in to comment.