{"id":18687390,"url":"https://github.com/junosuarez/web-login","last_synced_at":"2025-11-08T02:30:33.765Z","repository":{"id":15716124,"uuid":"18454179","full_name":"junosuarez/web-login","owner":"junosuarez","description":"A maximally minimal proposal for browser-based user identity management","archived":false,"fork":false,"pushed_at":"2016-01-22T07:27:33.000Z","size":5,"stargazers_count":44,"open_issues_count":3,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-15T16:46:23.993Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"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/junosuarez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-04T22:12:03.000Z","updated_at":"2023-10-28T07:35:06.000Z","dependencies_parsed_at":"2022-07-22T22:49:37.853Z","dependency_job_id":null,"html_url":"https://github.com/junosuarez/web-login","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fweb-login","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fweb-login/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fweb-login/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/junosuarez%2Fweb-login/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/junosuarez","download_url":"https://codeload.github.com/junosuarez/web-login/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239545497,"owners_count":19656793,"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-07T10:32:39.375Z","updated_at":"2025-11-08T02:30:33.734Z","avatar_url":"https://github.com/junosuarez.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"web-login\n=========\n\nbare-bones browser-based identity for the web\n\n## design goals\n\n- support multiple identity providers / protocols\n- universal login api for web platform\n- small API surface, simple token\n- privacy-preserving, doesn't leak additional user information without their knowledge\n- no extra features / protocols / barriers to implementation or adoption\n\n## api\n\n```js\n\nnavigator.login() =\u003e Promise\u003cToken\u003e\n// Token is a string of a cryptographically secure token representing the user's identity\n```\n\n## example\n\nSee the [demo](https://jden.github.io/web-login-prollyfill/).\n\n```js\nnavigator.login().then(function (token) {\n\n  // token = eg 7a14d72ae2c75497c7533e63a6ca2720888b204e\n\n  return http.post({\n    location: 'https://example.com/sessions',\n    data: {token: token}\n  })\n\n})\n.catch(function (err) {\n  console.log('could not log in:', err)\n})\n.then(loggedInMain)\n```\n\n## sequences\n\n### Normal Login\n![](http://g.gravizo.com/g?\n  @startuml;\n  ;\n  actor User;\n  participant \"Client Side App\";\n  participant Browser;\n  participant \"Identity Provider\";\n  participant Server;\n  ;\n  User -\u003e \"Client Side App\": Click login button;\n  \"Client Side App\" -\u003e Browser: call navigator.login%28%29;\n  Browser -\u003e User: Ask user to pick IDP;\n  User -\u003e Browser: Choose IDP;\n  Browser -\u003e \"Identity Provider\": Initiate authentication process;\n  \"Identity Provider\" -\u003e User: Do user authentication process, if any;\n  User -\u003e \"Identity Provider\": Complete authentication process;\n  \"Identity Provider\" -\u003e Browser: Return IDP token;\n  Browser -\u003e \"Client Side App\": Return hashed WebLogin Token;\n  \"Client Side App\" -\u003e Server: Authenticate with WebLogin Token;\n  Server -\u003e \"Client Side App\": Begin authenticated user session...;\n  ;\n  @enduml;\n)\n\nDepending on the User Agent, users may be able to cache their Identity Provider credentials (for example, a \"remember my username and password\" checkbox) to eliminate some user-involved steps in this process.\n\n## request for contributions\n\nfeedback, issues, and pull requests welcome. **use cases and security review especially welcome**\n\nCome chat about it in IRC in #weblogin on irc.freenode.net\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Fweb-login","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjunosuarez%2Fweb-login","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjunosuarez%2Fweb-login/lists"}