Skip to main content

verify_auth_user_exists

Function verify_auth_user_exists 

Source
async fn verify_auth_user_exists(
    auth_user: AuthUser,
    pool: Option<&Data<PgPool>>,
    session: &Session,
) -> Result<AuthUser, ControllerError>
Expand description

Re-fetches the user from the database and refreshes the session once it is more than 3 hours old; otherwise returns the session’s cached AuthUser unchanged.