Skip to main content

handle_login

Function handle_login 

Source
pub async fn handle_login(
    ctx: &ReqCtx,
    email: &str,
    password: &str,
    csrf: Option<&str>,
) -> ApiResponse
Expand description

Validate credentials against the admin table and, on success, redirect to the dashboard with the auth cookie set. csrf is the submitted hidden field; it must match the CSRF cookie or the post is rejected before any lookup.