You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -155,6 +155,23 @@ Actions which have a `task` property can be scheduled as a task. A `queue` prope
155
155
task= { queue: "default", frequency: 1000*60*60 }; // run the task every hour
156
156
```
157
157
158
+
## Marking Secret Fields in Action Inputs
159
+
160
+
You can mark sensitive fields in your zod schemas as secret using the custom `.secret()` mixin. This is useful for fields like passwords, API keys, or tokens that should never be logged or exposed in logs.
161
+
162
+
**How to use:**
163
+
164
+
```ts
165
+
inputs=z.object({
166
+
email: z.string().email(),
167
+
password: z.string().min(8).secret(), // This field will be redacted in logs
168
+
});
169
+
```
170
+
171
+
When an action is executed, any field marked with `.secret()` will be replaced with `[[secret]]` in logs and not exposed in any logging output, even if the action fails or validation errors occur.
172
+
173
+
This works for any zod field type (string, number, etc). Simply chain `.secret()` to the field definition.
0 commit comments