{"id":20631191,"url":"https://github.com/solidlabresearch/lit-solid-login","last_synced_at":"2026-04-25T03:36:09.728Z","repository":{"id":194079783,"uuid":"684225098","full_name":"SolidLabResearch/lit-solid-login","owner":"SolidLabResearch","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-29T09:50:14.000Z","size":514,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-17T07:09:34.196Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SolidLabResearch.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-28T17:50:37.000Z","updated_at":"2023-09-11T13:24:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"6342d8eb-3278-4cd4-ac5a-da75d0b1fd65","html_url":"https://github.com/SolidLabResearch/lit-solid-login","commit_stats":null,"previous_names":["solidlabresearch/lit-solid-login"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidLabResearch%2Flit-solid-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidLabResearch%2Flit-solid-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidLabResearch%2Flit-solid-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SolidLabResearch%2Flit-solid-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SolidLabResearch","download_url":"https://codeload.github.com/SolidLabResearch/lit-solid-login/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242588427,"owners_count":20154203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T14:11:27.777Z","updated_at":"2025-12-16T02:05:52.109Z","avatar_url":"https://github.com/SolidLabResearch.png","language":"JavaScript","readme":"# Solid Login Web Component\n\nThis is a [Web Component](https://github.com/SolidLabResearch/lit-solid-login) that enables users to log in with Solid-OIDC.\nWe used [Lit](https://lit.dev/) to build the component.\nThe component is framework-agnostic.\nYou can use it with vanilla JavaScript, but also frameworks such as React and Vue.\nEnd-users have the option to use either their WebID or Identity Provider to log in.\nThis component follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.\nYou find a screencast [here](https://cloud.ilabt.imec.be/index.php/s/gWfBDSp5WZKaySc).\n\n## Installation\n\nThis doesn't work (yet).\n\n```shell\nnpm i solid-login\n```\n\nBut the following does.\n\n```shell\nnpm i https://github.com/SolidLabResearch/lit-solid-login\n```\n\n## Usage\n\n```html\n\u003cscript type=\"module\"\u003e\n  import 'solid-login/solid-login.js';\n\u003c/script\u003e\n\n\u003csolid-login /\u003e\n```\n\nThe screenshot belows shows the result in a Web app.\n\n![A screenshot from a Web app.\nIt contains two radio buttons next to each other:\none for \"WebID\" and one for \"Identity Provider\".\nBelow that there is a field where the user fills in either their WebID or\nIdentity Provider.\nNext to the field is the login button.](screenshot.png)\n\nBest to have a look at the code in the folder `demo` to see how we do it now.\n\n## Options\n\nAll of these options are optional.\n\n- `selectedOption` (String): If the default login is via WebID or IDP. Values: \"webid\" or \"idp\". Default is \"webid\".\n- `loginCallback` (Function): The component calls this function when the login button is pressed.\nThis disables the default Solid-OIDC login process.\n- `loggedInCallback` (Function): The component calls this function when the user is logged in.\n- `loggedOutCallback` (Function): The component calls this function when the user is logged out.\n- `handleIncomingRedirectOptions` (Object): This object overwrites the default options for `handleIncomingRedirect`.\n- `loginOptions` (Object): This object overwrites the default options for `login`.\n- `showWelcomeMessage` (Boolean): If this is true, then a message is shown when logged in. Default is true.\n\n## Local Demo\n\n1. Install the dependencies via\n\n   ```shell\n   npm i\n   ```\n\n2. Start the demo via\n\n   ```shell\n   npm start\n   ```\n\n   Keep the demo running.\n3. In another terminal prepare the Solid pods via\n\n   ```shell\n   npm run prepare:pods\n   ```\n\n4. Start the Solid server with the pods via\n\n   ```shell\n   npm run start:pods\n   ```\n\n   The server is ready when the following message appears in the terminal\n\n   ```text\n   Listening to server at http://localhost:3000/\n   ```\n\n   Keep this process running.\n\n5. Open a browser at \u003chttp://localhost:8080\u003e.\n\n## Tests\n\n1. Install the dependencies via\n\n   ```shell\n   npm i\n   ```\n\n2. Start the demo via\n\n   ```shell\n   npm start\n   ```\n\n   Keep the demo running.\n3. In another terminal prepare the Solid pods via\n\n   ```shell\n   npm run prepare:pods\n   ```\n\n4. Start the Solid server with the pods via\n\n   ```shell\n   npm run start:pods\n   ```\n\n   The server is ready when the following message appears in the terminal\n\n   ```text\n   Listening to server at http://localhost:3000/\n   ```\n\n   Keep this process running.\n5. In another terminal run the tests via\n\n   ```shell\n   npm test\n   ```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidlabresearch%2Flit-solid-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolidlabresearch%2Flit-solid-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolidlabresearch%2Flit-solid-login/lists"}