15 lines
397 B
Rust
15 lines
397 B
Rust
use crate::error::AppError;
|
|
use crate::service::AuthService;
|
|
use crate::session::Session;
|
|
|
|
impl AuthService {
|
|
pub async fn auth_logout(&self, context: &Session) -> Result<(), AppError> {
|
|
if let Some(user_uid) = context.user() {
|
|
tracing::info!(user_uid = %user_uid, "User logged out");
|
|
}
|
|
context.clear_user();
|
|
context.clear();
|
|
Ok(())
|
|
}
|
|
}
|