I have SharePoint online hosted app with multiple pages, on the first page I am getting
contextToken = TokenHelper.GetContextTokenFromRequest
and use it for own needs (clientContext = TokenHelper.GetClientContextWithContextToken)
, and also getting
token = TokenHelper.GetClientContextTokenWithContextToken
which I save into Session to use on other pages.
On the next pages, I get contextToken from Session and use it with
clientContext = TokenHelper.GetClientContextWithContextToken
everything works fine on all pages.
I can get currentUser.LoginName / currentUser.Groups
information on all pages.
But since I can open my pages in the new window and when I logged out from Sharepoint online, I still able to get currentUser.LoginName / currentUser.Groups
information on pages where contextToken in the Session.
I should somehow find how to properly logout from my SharePoint hosted app when user logged out from SharePoint online.