Update cookie-sharing.md (#2790)
* Update cookie-sharing.md Added a tip to suggest to add a dependency for the code to start working. It was not obvious and made me search through source code * removed tippull/2803/head
parent
c99732266e
commit
631f5c0229
|
@ -42,6 +42,8 @@ app.UseCookieAuthentication(new CookieAuthenticationOptions
|
||||||
DataProtectionProvider = DataProtectionProvider.Create(new DirectoryInfo(@"c:\shared-auth-ticket-keys\"))
|
DataProtectionProvider = DataProtectionProvider.Create(new DirectoryInfo(@"c:\shared-auth-ticket-keys\"))
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The `DataProtectionProvider` requires the `Microsoft.AspNetCore.DataProtection.Extensions` NuGet package.
|
||||||
|
|
||||||
When used in this manner, the DirectoryInfo should point to a key storage location specifically set aside for authentication cookies. The cookie authentication middleware will use the explicitly provided implementation of the DataProtectionProvider, which is now isolated from the data protection system used by other parts of the application. The application name is ignored (intentionally so, since you're trying to get multiple applications to share payloads).
|
When used in this manner, the DirectoryInfo should point to a key storage location specifically set aside for authentication cookies. The cookie authentication middleware will use the explicitly provided implementation of the DataProtectionProvider, which is now isolated from the data protection system used by other parts of the application. The application name is ignored (intentionally so, since you're trying to get multiple applications to share payloads).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue