Create a user without Koreader

Open
#48 0 comments 12 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
45/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Quiet
Tech stack
bash
Domain
documentation

Research direction

Start by reviewing the Bash/curl workflow in the issue and the /users/create endpoint it calls. Confirm whether this process should be added to the project's documentation; done means a newcomer can create a user without the Koreader application, with the MD5 password and server URL details explained.

Written by the indexing model from the issue text.

Description

If anyone else was wondering how to create a user without the Koreader application (for example for when you use an Xteink X4/X3 and just want the koreader sync feature)

#!/bin/bash

# remove the `<` and `>` brackets 
USERNAME="<some_username>" # replace your username here
PASSWORD="<some_password>" # replace your password here
SERVER="https://<your_koreader_sync_server:7200>" # Omit the port if you're using a reverse proxy, or change the port to whatever you're exposing through docker.

PASSWORD_MD5=$(echo -n "$PASSWORD" | md5sum | awk '{print $1}')

curl -k -X POST "$SERVER/users/create" \
  -H "Accept: application/vnd.koreader.v1+json" \
  -H "Content-Type: application/json" \
  -d "{\"username\":\"$USERNAME\",\"password\":\"$PASSWORD_MD5\"}"
Dominant language
Lua
Stars
824
Forks
66
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from koreader/koreader-sync-server

All issues in koreader/koreader-sync-server

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.