Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ NEXT_PUBLIC_MANIFEST_RESOURCE_URI="resource.ttl"
# Admin WebID used for booting the demo (replace with your WebID)
NEXT_PUBLIC_ADMIN_WEBID="https://id.inrupt.com/your-webid"

# OIDC issuer URL for authentication
# Default Inrupt provider, can be changed to other Solid-compatible providers
NEXT_PUBLIC_OIDC_ISSUER="https://login.inrupt.com"

# Notes:
# - Never commit secrets. This file is safe to commit because it contains placeholders only.
# - For private credentials (if any), keep them in `.env` or `.env.local` which are ignored by git.
9 changes: 9 additions & 0 deletions src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ export class Config {

return value;
}

public static get oidcIssuer(): string {
const value = process.env.NEXT_PUBLIC_OIDC_ISSUER;
if (value === undefined) {
throw new Error(`${errorTemplate}NEXT_PUBLIC_OIDC_ISSUER`);
}

return value;
}
}
2 changes: 1 addition & 1 deletion src/components/ui/ListEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export function ListEditor() {
console.log("unauthenticated");

await login({
oidcIssuer: "https://login.inrupt.com", // TODO: config
oidcIssuer: Config.oidcIssuer,
clientName: "My application",
});
}
Expand Down