| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f7530d3 commit 88e04cd
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -60,16 +60,21 @@ A typical app composes the stack: | |||
| 60 | 60 | <!-- 1. JSON-LD data island, inline (or load from a pod via ?uri= query param) --> | |
| 61 | 61 | <script type="application/ld+json">{ "@type": "Tracker", "issue": [...] }</script> | |
| 62 | 62 | ||
| 63 | - <!-- 2. Panes — declare which to load (LOSOS picks via canHandle) --> | ||
| 63 | + <!-- 2. Login (xlogin: Nostr NIP-07/NIP-98 + Solid OIDC/DPoP). | ||
| 64 | + One script tag adds the Login button and exposes window.xlogin.authFetch | ||
| 65 | + which LOSOS panes prefer over plain fetch for pod writes. --> | ||
| 66 | + <script src="https://unpkg.com/xlogin"></script> | ||
| 67 | + | ||
| 68 | + <!-- 3. Panes — declare which to load (LOSOS picks via canHandle) --> | ||
| 64 | 69 | <script type="module" data-pane src="https://losos.org/panes/todo-pane.js"></script> | |
| 65 | 70 | <script type="module" data-pane src="https://losos.org/panes/schema-pane.js"></script> | |
| 66 | 71 | <script type="module" data-pane src="https://solid-panes.github.io/schema-view.js"></script> | |
| 67 | 72 | <script type="module" data-pane src="https://losos.org/panes/source-pane.js"></script> | |
| 68 | 73 | ||
| 69 | - <!-- 3. Mount point --> | ||
| 74 | + <!-- 4. Mount point --> | ||
| 70 | 75 | <div id="losos"></div> | |
| 71 | 76 | ||
| 72 | - <!-- 4. Boot: autoSchema patches $schema based on @type, then shell --> | ||
| 77 | + <!-- 5. Boot: autoSchema patches $schema based on @type, then shell --> | ||
| 73 | 78 | <script type="module"> | |
| 74 | 79 | import { autoSchema } from 'https://solid-panes.github.io/auto-schema.js' | |
| 75 | 80 | await autoSchema() | |
@@ -87,6 +92,20 @@ That's the universal pattern. What changes between apps is mostly: the data, whi | |||
| 87 | 92 | 4. Commit + push. | |
| 88 | 93 | 5. The catalog (https://solid-apps.github.io/) and reverse-index update automatically. | |
| 89 | 94 | ||
| 95 | + ## Authentication | ||
| 96 | + | ||
| 97 | + xlogin (https://github.com/melvincarvalho/xlogin) is the auth layer of the stack — a single `<script src="https://unpkg.com/xlogin">` tag adds a Login button supporting both Nostr (NIP-07/NIP-98) and Solid (OIDC/DPoP). On login it exposes: | ||
| 98 | + | ||
| 99 | + - `window.xlogin.type` — `"nostr"` or `"solid"` | ||
| 100 | + - `window.xlogin.id` — the user's pubkey or WebID | ||
| 101 | + - `window.xlogin.authFetch(url, opts)` — authenticated fetch (NIP-98 or DPoP based on login type) | ||
| 102 | + | ||
| 103 | + LOSOS's panes already prefer `window.xlogin.authFetch` over plain `fetch` for writes — the pattern is `(window.xlogin && window.xlogin.authFetch) || fetch`. Adding the script tag is enough to enable real-pod writes; nothing else changes. | ||
| 104 | + | ||
| 105 | + To target a real pod resource at runtime, the user appends `?uri=https://my.pod/today.jsonld` to the app URL. LOSOS's shell fetches it with `authFetch` and round-trips edits via authenticated PUT. | ||
| 106 | + | ||
| 107 | + See https://github.com/melvincarvalho/xlogin/blob/gh-pages/SKILL.md for the full xlogin API. | ||
| 108 | + | ||
| 90 | 109 | ## Don't | |
| 91 | 110 | ||
| 92 | 111 | - Don't list types in `app.json#types` that aren't in urn-solid. | |
@@ -108,3 +127,4 @@ That's the universal pattern. What changes between apps is mostly: the data, whi | |||
| 108 | 127 | - `solid-schema` — type contracts | |
| 109 | 128 | - `solid-panes` — pane registry (which pane handles which type) | |
| 110 | 129 | - `losos` — runtime | |
| 130 | + - `xlogin` — auth (Nostr + Solid). https://github.com/melvincarvalho/xlogin/blob/gh-pages/SKILL.md | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments