Commit 47ad646
committed
fix(auth): fallback to direct cleanup when tenant context is unavailable
When CurrentTenant(ctx) fails in the session cleanup worker (no tenant
in background context), fall back to DeleteExpired without RLS instead
of logging an error and skipping cleanup entirely. This is safe as the
query only deletes expired sessions and runs as DB owner.1 parent 79e355e commit 47ad646
1 file changed
Lines changed: 12 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
170 | 179 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | 180 | | |
178 | 181 | | |
179 | 182 | | |
| |||
0 commit comments