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: src/content/docs/identityserver/troubleshooting/index.mdx
+25-2Lines changed: 25 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -269,11 +269,34 @@ When invoking `Challenge`, be sure to call `SignOutAsync` before returning the c
269
269
270
270
### Set SaveTokens to `false`
271
271
272
-
When dealing with external authentication, you may want to set `SaveTokens` to `false` when calling `AddOpenIdConnect` to avoid storing the tokens in the cookie. Storing these tokens may not be necessary for your use case and thus take up unnecessary space.
272
+
When dealing with external authentication, you may want to set `SaveTokens` to `false` when calling `AddOpenIdConnect`
273
+
to avoid storing the tokens in the cookie. Storing these tokens may not be necessary for your use case and take up unnecessary space.
274
+
275
+
```csharp {5}
276
+
// Program.cs
277
+
services.AddAuthentication()
278
+
.AddOpenIdConnect(options=>
279
+
{
280
+
options.SaveTokens=false;
281
+
});
282
+
```
273
283
274
284
### Set MapInboundClaims to `false`
275
285
276
-
When dealing with external authentication, you may want to set `MapInboundClaims` to `false` when calling `AddOpenIdConnect` to avoid mapping the claims from the external provider to the local user. Microsoft's namespace for external claims is `http://schemas.microsoft.com/identity/claims/` is larger than the claim names used by OpenID Connect and can take up unnecessary space.
286
+
When dealing with external authentication, you may want to set `MapInboundClaims` to `false` when calling `AddOpenIdConnect`
287
+
to avoid mapping the claims from the external provider.
288
+
289
+
Microsoft's namespace for external claims is `http://schemas.microsoft.com/identity/claims/`, which is significantly larger
290
+
than the claim names used by OpenID Connect and can take up unnecessary space.
291
+
292
+
```csharp {5}
293
+
// Program.cs
294
+
services.AddAuthentication()
295
+
.AddOpenIdConnect(options=>
296
+
{
297
+
options.MapInboundClaims=false;
298
+
});
299
+
```
277
300
278
301
### Implement `OnTicketReceived` To Reduce Cookie Size
0 commit comments