mosaic auth
Saves browser sessions for sites that need a login. mosaic get and mosaic search --download use a saved session when no open copy of a paper exists.
Usage
mosaic auth login elsevier --url https://www.sciencedirect.com # log in once, in a browser window
mosaic auth login myuni --url https://library.myuni.edu/login # any site, under your own name
mosaic auth status # the sessions, and how old each login is
mosaic auth logout elsevier # forget oneBehaviour
auth login opens a browser window at --url; you log in there, then press Enter in the terminal, and the cookies are saved under NAME in ~/.config/mosaic/sessions/ (readable by you only). It needs the browser extra and a Playwright browser (playwright install chromium); mosaic uses the first of Firefox, Chromium and WebKit that launches. Names offered by tab completion: elsevier, springer, scopus; any other name works.
auth status shows each session's site and the age of its login. Publishers expire logins: when a download that used to work fails, log in again.
Some publishers refuse every automated browser, logged in or not (Elsevier answers HTTP 403). For those use mosaic get --handoff.
See also: tutorial 5, authenticated access.
Options
mosaic auth login
Open a browser, log in to a site, and save the session for future PDF downloads.
mosaic auth login [OPTIONS] NAME| Argument | Value | Description |
|---|---|---|
NAME | TEXT | Session name, e.g. elsevier, springer, myuni |
| Option | Value | Default | Description |
|---|---|---|---|
--url, -u | TEXT | URL to open in the browser for login |
mosaic auth logout
Remove a saved browser session.
mosaic auth logout [OPTIONS] NAME| Argument | Value | Description |
|---|---|---|
NAME | TEXT | Session name to remove |
mosaic auth status
List all saved browser sessions.
mosaic auth status [OPTIONS]
