Skip to content

replace Inrupt by Uvdsl OIDC client#760

Open
bourgeoa wants to merge 15 commits into
stagingfrom
uvdsl
Open

replace Inrupt by Uvdsl OIDC client#760
bourgeoa wants to merge 15 commits into
stagingfrom
uvdsl

Conversation

@bourgeoa

Copy link
Copy Markdown
Contributor

Commit Notes - solid-ui (uvdsl contract adoption)

Scope

Update solid-ui to consume the new uvdsl session contract directly and stabilize local integrated development with linked solid-logic.

What changed

  • Migrate login calls to new signature:
    • from object-style { oidcIssuer, redirectUrl }
    • to positional login(issuer, redirectUrl)
  • Replace auth session EventEmitter usage with EventTarget usage (addEventListener('sessionStateChange', ...)) where updated.
  • Switch session state reads to the new contract (webId / isActive) with fallback only where still needed for integrated migration.

Local integrated development notes kept intentionally

tsconfig.json includes settings to avoid duplicate rdflib type identities when solid-ui is linked with local solid-logic:

  • preserveSymlinks: true
  • baseUrl + paths mapping for rdflib

This avoids false-positive type errors like LiveStore is not assignable to IndexedFormula caused by two rdflib type origins.

Jest stabilization for local linked repos

  • Map solid-logic to source in Jest to avoid loading webpack bundle output during tests.
  • Mock @uvdsl/solid-oidc-client-browser for Jest/JSDOM to avoid ESM/import.meta runtime issues.

Integration outcome

  • solid-ui now listens to the native session state change flow expected by the uvdsl client.
  • Downstream packages can continue to function while solid-logic carries temporary compatibility shims.

Suggested commit message

Title

feat(auth): adopt uvdsl session contract in solid-ui and stabilize local linked dev

Body

  • Update solid-ui auth flow to uvdsl login/session contract
  • Move session listeners to EventTarget sessionStateChange pattern
  • Keep local linked-repo TypeScript settings to prevent duplicate rdflib type identity errors
  • Add Jest mappings/mocks so tests run against source in local integrated workspace
  • Document local integrated development rationale in README

Suggested post-validation cleanup commit (optional)

Title

refactor(auth): remove remaining transitional auth fallbacks in solid-ui

Body

  • Remove temporary fallback reads for legacy session shapes
  • Keep only uvdsl-native state/event handling once integrated tests are stable

Copilot AI review requested due to automatic review settings May 20, 2026 17:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates solid-ui’s authentication integration to align with a new uvdsl-oriented session/login contract, while also adjusting TypeScript/Jest configuration to support local “linked repo” development.

Changes:

  • Update login calls to a positional authSession.login(issuer, redirectUrl) signature.
  • Switch a session-state read in loginStatusBox from authSession.info.* to authSession.webId.
  • Add TS/Jest configuration and Jest mocks intended to stabilize local development when linking to a local solid-logic.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tsconfig.json Enables preserveSymlinks and adds baseUrl/paths mapping intended to avoid duplicate rdflib type identities when linking repos.
test/mocks/solid-oidc-client-browser.ts Adds a Jest mock for @uvdsl/solid-oidc-client-browser’s Session API surface.
src/v2/components/loginButton/LoginButton.ts Updates login call site to positional login(issuer, redirectUrl).
src/v2/components/footer/Footer.ts Simplifies event unsubscription logic by removing removeListener fallback.
src/login/login.ts Updates popup login call to positional signature and changes session webId read to authSession.webId.
jest.config.mjs Adds module mappings for local linked solid-logic source and the uvdsl OIDC client mock.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread jest.config.mjs
Comment on lines 17 to 21
moduleNameMapper: {
'^.+\\.css$': '<rootDir>/__mocks__/styleMock.js'
'^.+\\.css$': '<rootDir>/__mocks__/styleMock.js',
'^solid-logic$': '<rootDir>/../solid-logic/src',
'^@uvdsl/solid-oidc-client-browser$': '<rootDir>/test/mocks/solid-oidc-client-browser.ts'
},
Comment thread src/v2/components/auth/loginButton/LoginButton.ts
Comment thread src/login/login.ts
Comment thread src/login/login.ts
…out endpoints

1. derive header auth state from auth session checks/events
2. call end_session and NSS well-known logout on logout
3. add/update header tests for session-driven state transitions
@timea-solid timea-solid linked an issue May 27, 2026 that may be closed by this pull request
bourgeoa and others added 8 commits June 2, 2026 23:05
… callback loops

add guarded OIDC callback bootstrap in solid-ui loginStatusBox
trigger authn.checkUser only when callback params are present
keep login flow stable by not stripping callback params during bootstrap
sanitize code/state/iss only in logout handler before reload
avoid stale callback URL causing re-entry into provider selection after logout
fix pref error undefined
Prompt: fix preferencesFileError can be undefined copilot suggestion
@bourgeoa bourgeoa self-assigned this Jun 10, 2026
@bourgeoa bourgeoa moved this to In review in SolidOS NLNet UI Jun 10, 2026
@bourgeoa bourgeoa changed the base branch from main to staging June 10, 2026 13:18

@NoelDeMartin NoelDeMartin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the conflicts, the only one I'm aware of is the Header, given that I changed it in my recent work with the design system. It should be fairly easy to resolve the conflicts, though, because I just added some conditionals but the Header component itself hasn't changed a lot.

The only important remark is that you should also add your modifications to the Auth workflow in src/design-system/lib/auth/SolidAuth.ts. It's not ideal that we have it in two places, but once we remove the DESIGN_SYSTEM_HEADER_ACCOUNT feature flag, it'll be just one (See #771 for details).

Finally, the history of the PR is a bit confusing to review because it includes even some commits from main, and I'm not sure what else. I'd suggest rebasing or cherry-picking your changes on top of the staging branch to make it clearer. That could also resolve most of the conflicts.

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

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

Switch out authentication library

4 participants