Bug description:
When fetching a WebID profile for OIDC issuer discovery, the rdflib fetcher doesn't send an Accept header preferring RDF formats. If the server returns HTML (with embedded JSON-LD) instead of Turtle, the solid:oidcIssuer is not discovered and authentication fails.
Steps to reproduce:
- Have a WebID profile that returns HTML by default (with JSON-LD) but Turtle when requested
- Ensure
solid:oidcIssuer is set in the Turtle representation
- Try to authenticate to NSS using a token from that IdP
- Authentication fails with "OIDC issuer not advertised"
Cause:
In preferred-provider.js, fetcher.load(webId, { force: true }) doesn't specify an Accept header. The server returns HTML, and rdflib fails to resolve relative URIs like @id: "#me" in the embedded JSON-LD.
Suggested fix:
const options = {
force: true,
headers: { 'Accept': 'text/turtle, application/ld+json, text/n3, application/rdf+xml' }
}
return fetcher.load(webId, options)