pub async fn invalidate_session(
pool: &Pool<MySql>,
session_token: &str,
) -> Result<()>
Expand description
Invalidates a user session.
This function marks a session as inactive, effectively logging the user out.
§Arguments
pool
- Database connection pool for executing the querysession_token
- The session token to invalidate
§Returns
Ok(())
- Successfully invalidated the sessionErr(anyhow::Error)
- Failed to invalidate the session