feat: add session tokens for automatic re-login #2

Merged
Aelthorim merged 1 commit from feat/session_tokens into main 2026-07-19 14:45:38 +02:00
Owner
  • LoginOk now includes a random session token; create_session inserts
    it into a new sessions table (token -> user_id)
  • Add ClientMessage::TokenLogin and server-side token_login /
    get_id_from_token to authenticate via a stored token instead of
    username+password
  • Client saves the token to a local session file on successful
    login and attempts TokenLogin automatically on startup if that
    file exists
  • Add sessions table creation to init_db
- LoginOk now includes a random session token; create_session inserts it into a new sessions table (token -> user_id) - Add ClientMessage::TokenLogin and server-side token_login / get_id_from_token to authenticate via a stored token instead of username+password - Client saves the token to a local `session` file on successful login and attempts TokenLogin automatically on startup if that file exists - Add sessions table creation to init_db
- LoginOk now includes a random session token; create_session inserts
  it into a new sessions table (token -> user_id)
- Add ClientMessage::TokenLogin and server-side token_login /
  get_id_from_token to authenticate via a stored token instead of
  username+password
- Client saves the token to a local `session` file on successful
  login and attempts TokenLogin automatically on startup if that
  file exists
- Add sessions table creation to init_db
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Aelthorim/chat-project!2
No description provided.