Commit 0f94243
fix(dotnet/login-auth-code): disable inbound claim remapping so given_name etc. work
Microsoft's OIDC middleware remaps inbound claims to long xmlsoap URIs
by default (given_name -> http://schemas.xmlsoap.org/.../givenname),
so user.FindFirst("given_name") in Program.cs returned null and the
page rendered "Welcome, there" against real tenants.
Setting MapInboundClaims = false keeps OIDC claim names as-is, so
FindFirst("given_name"/"family_name"/"email") lines up with both the
ID token payload and the claims our test fixture injects. Tests still
pass (4/4) because they already use the short claim names.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d2a43c1 commit 0f94243
2 files changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
| |||
0 commit comments