Create a sign-out UI element
The first step is to create a link, button, or another similar UI
element that allows the user to sign out of the app.
Revoke the access token
When the sign out is initiated, create the following flow:
- Obtain the access token from the session state. This token was placed into the session state during the user sign-in flow.
The code snippet uses objects from
Microsoft.Owin.Security to manage the session state of the tokens. - Call the
RevokeTokensAsync method of IDXClient and pass in the access token that you obtained in step 1.
Send the user to the signed-out page
After the user is signed out, send them to the desired page.
See also
Validate SSO federation