pub fn login(
    db: &Database,
    item: &LoginInput
) -> Result<(String, String), (i32, &'static str)>
Expand description

/login

creates a user session for the user associated with item in the request body (have the content-type header set to application/json and content that can be deserialized into LoginInput)

Returns Result

  • Ok([AccessToken], [RefreshToken])
    • an access token that should be sent to the user in the response body,
    • a reset token that should be sent as a secure, http-only, and same_site=strict cookie.
  • Err([StatusCode], [Message])