Commit 41e2b61
fix(auth): correct SCIM email lookup, keep SSO redirect
Address CodeRabbit review on the follow-up PR:
- SCIM `GET /Users?filter=userName eq "…"` resolved an arbitrary org member
and compared its email, so in multi-member orgs an existing user could be
missed and the IdP would retry against the 409 create path. Resolve the user
by email first, then confirm org membership. externalId lookups keep their
DB-level filter.
- Login: carry the validated `?redirect=` target through `errorCallbackURL` so
a failed SSO attempt returns to /login with the intended destination.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 3a20c62 commit 41e2b61
2 files changed
Lines changed: 35 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
307 | 329 | | |
308 | 330 | | |
309 | 331 | | |
310 | | - | |
311 | | - | |
312 | | - | |
| 332 | + | |
313 | 333 | | |
314 | 334 | | |
315 | 335 | | |
316 | 336 | | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
327 | 340 | | |
328 | 341 | | |
329 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
221 | 228 | | |
222 | 229 | | |
223 | 230 | | |
224 | 231 | | |
225 | 232 | | |
226 | | - | |
| 233 | + | |
227 | 234 | | |
228 | 235 | | |
229 | 236 | | |
| |||
0 commit comments