Skip to content

replace Inrupt by Uvdsl OIDC client#760

Open
bourgeoa wants to merge 1 commit into
mainfrom
uvdsl
Open

replace Inrupt by Uvdsl OIDC client#760
bourgeoa wants to merge 1 commit into
mainfrom
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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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'
},
redirectUrl: locationUrl.href,
oidcIssuer: issuerUri
})
await authSession.login(issuerUri, locationUrl.href)
Comment thread src/login/login.ts
redirectUrl: locationUrl.href,
oidcIssuer: issuerUri
})
await authSession.login(issuerUri, locationUrl.href)
Comment thread src/login/login.ts
Comment on lines 668 to 674
box.refresh = function () {
const sessionInfo = authSession.info
if (sessionInfo && sessionInfo.webId && sessionInfo.isLoggedIn) {
me = solidLogicSingleton.store.sym(sessionInfo.webId)
const webId = authSession.webId
if (webId) {
me = solidLogicSingleton.store.sym(webId)
} else {
me = null
}
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.

2 participants