Family sharing API doc
[tolino-api-docs.git] / api / usecase-login.rst
1 =============
2 Login process
3 =============
4
5 The user-facing stuff happens in the web browser.
6
7 1. Fetch URL of login page: `GET https://thalia.de/auth/oauth2/authorize`_
8 2. Show login page with username + password form
9 3. Redirect to internal e-book reader login with code.
10
11    Example redirect: ``Location: epublishing://login?code=GK6jDC``
12 4. Request OAuth access token: `POST https://thalia.de/auth/oauth2/token`_
13 5. Check if the device has been registered already: `GET https://bosh.pageplace.de/bosh/rest/userid/xxx`_
14 6. Register the device to the user: `POST https://bosh.pageplace.de/bosh/rest/v2/registerhw`_
15 7. Run the `Sync process`_