Skip to content

feat: /account.html post-sign-in dashboard#16

Merged
melvincarvalho merged 1 commit into
gh-pagesfrom
feat-account-dashboard
May 16, 2026
Merged

feat: /account.html post-sign-in dashboard#16
melvincarvalho merged 1 commit into
gh-pagesfrom
feat-account-dashboard

Conversation

@melvincarvalho

Copy link
Copy Markdown
Contributor

Summary

After sign-in, jspod now lands the user on `/account.html` — a small Pivot/sc.net-style dashboard — instead of bouncing them back to `/`. The page mirrors what other Solid servers do: shows the user's identity, gives navigation handles, exposes Sign out.

What's on the dashboard

  • WebID display, clickable to the profile resource (http://localhost:5444/profile/card.jsonld#me)
  • Pod URL
  • Explore buttons: /profile/, /public/, /private/, /inbox/, /settings/
  • Sign out — calls `session.logout()`, redirects to /
  • Footer credit (jspod + solid-oidc)

Auth-state-aware

account.html is public-read so it always loads. JS inside picks a branch:

  • Active session → full dashboard
  • No session → "You're not signed in" + Sign in button pointing at /signin.html
  • restore() throws (no prior session) → treated as "no session" (same handling as signin.html)

Flow change

signin.html post-success redirect: //account.html. welcome.html gets a small "Account" button next to "Sign in" so signed-in returning visitors have a clear route back.

Test plan

  • Local: account.html + .acl shipped, served unauthenticated (HTTP 200, public-read inherits)
  • Browser: sign-in flow lands on account.html with WebID + pod URL rendered correctly
  • Browser: clicking Sign out clears the session and redirects to /
  • Browser: visiting /account.html unauthenticated shows the signed-out branch with a Sign in CTA
  • WebID link navigates to the profile resource (renders in data browser)
  • Reviewer: npx jspod@0.0.18 after merge + publish for the full flow

Refs #1

After sign-in, signin.html now redirects to /account.html instead
of /. The new dashboard mirrors the Pivot / sc.net pattern:

- WebID display (clickable link to the profile resource)
- Pod URL
- Explore buttons for /profile/, /public/, /private/, /inbox/,
  /settings/ — direct nav, no probe required since the user is
  already authenticated
- Sign out button — calls session.logout(), redirects to /
- Footer credit pointing at jspod + solid-oidc

The page is auth-state-aware via solid-oidc:
- Active session  → full dashboard
- No session      → "You're not signed in. [Sign in]" with a
                    button pointing at /signin.html
- restore() failure → silently treated as "no session" (same
                    "Missing refresh data" handling as signin.html)

Public-read ACL (account.html.acl) so the page itself loads
before / without any session.

Welcome.html also gets an "Account" button alongside Sign in so
signed-in returning visitors have a clear route back.

Files:
- account.html (~5 KB, single file)
- account.html.acl
- signin.html — post-success redirect → /account.html
- welcome.html — Account button added next to Sign in
- index.js — always-overwrite copy for both new files
- package.json — files whitelist + 0.0.18 bump

Refs #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant