Can an action that nobody sees be a sanctification of God's Name?
According to the ruling of the Rambam quoted here, a person sanctifies God's Name by performing a mitzvah or refraining from sin solely because it is God's will, without seeking honor or reward or fearing punishment. This also applies in complete privacy; Joseph's refusal to sin with Potiphar's wife is the example given. Conversely, violating Torah out of deliberate contempt for God's word desecrates His Name.
A practical halachic question: the final ruling is for your rabbi.
Quote from the source«He gives as an example of this, Yosef’s refraining from sin when tempted by the wife of Potiphar.»
- Author
- Rambam
- Source
- Parsha.net — Vayechi81, p. 4
- Parsha
- Vayechi