Skip to content

Commit f7530d3

Browse files
todos: add xlogin shim — pod-authenticated writes via one script tag
Drops in xlogin (Nostr NIP-07/NIP-98 + Solid OIDC/DPoP) as a single script. Adds the purple Login button bottom-right; on login, exposes window.xlogin.authFetch which LOSOS's todo-pane and schema-pane already prefer over plain fetch ((window.xlogin && window.xlogin.authFetch) || fetch). Result: when someone forks this app and points it at a real pod URL (?uri=https://my.pod/today.jsonld), edits sync back via DPoP- or NIP-98-authenticated PUTs. No code changes needed. The data is currently inline so writes don't actually persist — but the auth wiring is now complete so a fork-with-pod-URL Just Works. Refs: https://github.com/melvincarvalho/xlogin
1 parent b022a1e commit f7530d3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

todos/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@
6767
}
6868
</script>
6969

70+
<!-- Login (xlogin: Nostr + Solid). Adds the purple Login button bottom-right;
71+
LOSOS panes pick up window.xlogin.authFetch for authenticated writes. -->
72+
<script src="https://unpkg.com/xlogin"></script>
73+
7074
<!-- Panes — todo-pane handles the Tracker, schema-view + source for individual Vtodos -->
7175
<script type="module" data-pane src="https://losos.org/panes/todo-pane.js"></script>
7276
<script type="module" data-pane src="https://losos.org/panes/schema-pane.js"></script>

0 commit comments

Comments
 (0)