bidluo / Lemur

WIP Lemmy Client for iOS. Built for iOS 17
GNU General Public License v3.0
7 stars 0 forks source link

Authentication #9

Closed bidluo closed 11 months ago

bidluo commented 1 year ago

Objective

Provide users with the ability to securely log in to the application and make authenticated requests to the API.

User Stories

  1. As a user, I want to securely login to the app using my email/username and password.
  2. As a user, I want my login session to persist across app closures and restarts.
  3. As a user, I want to securely logout from the app, ending my current session.

Acceptance Criteria

  1. User can enter their email/username and password into a form.
  2. Upon form submission, the app will make a POST request to the /login endpoint with the login payload.
  3. User can logout from the app which will invalidate their current session.

Required API Fields

Request

Response

Out of Scope

Further Details

Upon successful login, the server will respond with a JWT token. This token should be included as an 'auth' parameter in the query string for all subsequent authenticated requests. The format of the parameter should be ?auth={token} where {token} is replaced with the actual JWT token received.