Some additional checks and cleanup
Build LinkLog Development Image / development-image (push) Successful in 10s

This commit is contained in:
2026-08-26 20:35:06 +02:00
parent b03a241be2
commit 018c02c759
6 changed files with 63 additions and 12 deletions
+16 -2
View File
@@ -69,6 +69,7 @@ Open these URLs:
- About: <http://localhost:8000/about>
- Admin page: <http://localhost:8000/admin>
- Web login: <http://localhost:8000/login>
- Token refresh: `POST http://localhost:8000/api/auth/refresh`
- Health check: <http://localhost:8000/health>
- OpenAPI documentation: <http://localhost:8000/docs>
@@ -158,12 +159,13 @@ The manifest includes stable Firefox extension metadata and references the packa
4. Choose `webextension/manifest.json`.
5. Open the LinkLog extension options and enter:
- Backend URL: the URL of your LinkLog server, such as `http://localhost:8000`
- Username: `alice`
- Email: `alice@example.com`
- Password: `secret123`
- One-time password: enter it when OTP is enabled
6. Save the settings and login.
7. Open a webpage, select the LinkLog toolbar button, review the title and URL, add a comment, and submit it.
When the extension settings page has a valid session, it shows `<username> logged in at <backend URL>` and a **Sign out** button instead of the login form. Signing out revokes the token and returns the form.
When the extension settings page has a valid session, it shows `<username> logged in at <backend URL>` and a **Sign out** button instead of the login form. Access and refresh credentials are kept in Firefox session storage, so a browser restart requires login again. Signing out revokes the token family and returns the form.
Temporary extensions are removed when Firefox restarts. Reload the extension from `about:debugging` after changing its files.
@@ -261,6 +263,18 @@ curl -X POST http://localhost:8000/api/auth/login \\
-d '{"email":"alice@example.com","password":"secret123"}'
```
The login response contains a 15-minute access token, a device-bound refresh token, its expiry time, and a `device_id`. Each successful refresh rotates the refresh token.
Refresh an access token:
```sh
curl -X POST http://localhost:8000/api/auth/refresh \\
-H 'Content-Type: application/json' \\
-d '{"refresh_token":"YOUR_REFRESH_TOKEN","device_id":"YOUR_DEVICE_ID"}'
```
Refresh-token reuse or a mismatched device ID returns `401` and revokes the token family. Signing out revokes the token family, while changing the password or completing a password reset revokes all sessions for the user.
Submit a link using the returned access token:
```sh