/// Logout service. This just logs the user out and then redirects them to the
/// homepage.
Logout service. This just logs the user out and then redirects them to the
homepage.
Logout service . This just logs the user out and then redirects them to the homepage .
pub async fn logout(identity: Identity) -> HttpResponse {
    // Forget the user's identity
    identity.forget();
    // Redirect the user to the homepage.
    HttpResponse::Found().header(LOCATION, "/").finish()
}
pub async fn logout ( identity : Identity ) -> HttpResponse { // Forget the user's identity identity . forget ( ) ; // Redirect the user to the homepage. HttpResponse :: Found ( ) . header ( LOCATION , " " ) . finish ( ) }
Logout service.
Logout service .
identity
Identity