From a09f423d5e9191d847a954d1ef5a41b43de561d7 Mon Sep 17 00:00:00 2001 From: Rick Anderson Date: Tue, 11 Sep 2018 15:21:34 -0700 Subject: [PATCH] Update secure-data.md (#8487) Fixes #8474 @gaazkam @smariussorin @C-BERBER please review --- aspnetcore/security/authorization/secure-data.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aspnetcore/security/authorization/secure-data.md b/aspnetcore/security/authorization/secure-data.md index b5b31657ce..3061362d0a 100644 --- a/aspnetcore/security/authorization/secure-data.md +++ b/aspnetcore/security/authorization/secure-data.md @@ -264,6 +264,10 @@ Update the details page model: [!code-csharp[](secure-data/samples/final2.1/Pages/Contacts/Details.cshtml.cs?name=snippet)] +## Add a user to a role + +Roles are stored in the Identity cookie. Changes made to user roles are not persisted to the cookie until the cookie is regenerated or the user signs out and signs in. Applications that add users to a role should call `SignInManager.RefreshSignInAsync(user)` to update the cookie. + ## Test the completed app If the app has contacts: