{"id":13555485,"url":"https://github.com/pouchdb/pouchbase","last_synced_at":"2025-10-16T00:18:52.684Z","repository":{"id":9699214,"uuid":"11648975","full_name":"pouchdb/pouchbase","owner":"pouchdb","description":"Server that lets PouchDB applications sync with passwordless logins","archived":false,"fork":false,"pushed_at":"2017-03-07T07:21:27.000Z","size":104,"stargazers_count":97,"open_issues_count":4,"forks_count":36,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-08-20T09:34:40.814Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/pouchdb.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":"2013-07-25T01:10:47.000Z","updated_at":"2023-11-04T02:14:19.000Z","dependencies_parsed_at":"2022-07-25T21:18:31.023Z","dependency_job_id":null,"html_url":"https://github.com/pouchdb/pouchbase","commit_stats":null,"previous_names":["daleharvey/couch-persona"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pouchdb/pouchbase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchdb%2Fpouchbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchdb%2Fpouchbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchdb%2Fpouchbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchdb%2Fpouchbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pouchdb","download_url":"https://codeload.github.com/pouchdb/pouchbase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pouchdb%2Fpouchbase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273435984,"owners_count":25105522,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-01T12:03:14.305Z","updated_at":"2025-10-16T00:18:47.650Z","avatar_url":"https://github.com/pouchdb.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","others"],"sub_categories":[],"readme":"DEPRECATED\n=========\n\nThis repository will likely be deleted shortly, keeping it up temporarily in case\nanyone wants to fork it etc before hand.\n\nPouchBase\n---------\n\nPouchBase is a service that lets your PouchDB applications easily provide login\nand online sync functionality.\n\nWhen users of your application want to login, they provide an email address and\nyour app notifies the pouch.host service of that email. pouch.host will generate\na token for that user and send it to their email address.\n\nWhen the user clicks the token, they will be authenticated with pouch.host and sent\nback to your application, pouch.host will create a database that that user alone\ncan access, your PouchDB application can then sync with that database so\nwhenever the user logs in to your application, their data is automatically\nkept in sync.\n\n\nPouchBase Getting Started\n-------------------------\n\nThe first step is to have a PouchDB application, you can visit\nhttp://pouchdb.com/getting-started.html for help getting started with PouchDB\n\nDownload https://pouchbase.com/pouchbase.js and\nadd it to your web application\n\n```html\n\u003cscript src=\"https://pouchbase.com/pouchbase.js\"\u003e\u003c/script\u003e\n```\n\nWhen the user wants to login, call PouchBase.login\n\n```javascript\nloginButton.addEventListener('click', function() {\n  PouchBase.login({\n    email: emailField.value\n  });\n});\n```\n\nThe user will then be sent an email, when they click on the url they will be\nauthenticated and sent back to your application with a valid session, so check\nfor a valid session when your web application loads\n\n```javascript\nvar db = .... // Instiated elsewhere\nvar sync;\n\nPouchBase.session().then(function (result) {\n   if (result.ok) {\n     // We have a valid session, sync!\n     sync = db.sync(result.db, {live: true});\n   }\n});\n```\n\nAnd your application should now keep your users data in sync wherever they\nlogin.\n\nPouchBase API\n-------------\n\nThe PouchBase API is a simple JSON api served from https://pouchbase.com/, if\nyou dont want to use the provided JS client, then you can call it directly.\n\n# POST /login/\n\n##### Example Body:\n\n```json\n{\n  \"email\": \"myemail@example.org\"\n}\n```\n\nSend a login request, the body of the request is JSON document, the `email` property\nis required, you can provide any extra fields you desire and they will be accessible\nvia the session API\n\n# GET /session/\n\nThis will return JSON that indicates if the current user has a valid session, if\nthey do any extra data provided to the `POST /login/` or `POST /session/` API will\nbe included in the response\n\n##### Example Response:\n\n```json\n{\n  \"ok\": true,\n  \"user\": \"myemail@example.org\",\n  \"db\": \"https://pouchbase.com/db/\"\n}\n```\n\n##### Failed Response:\n\n```json\n{\n  \"error\": true,\n  \"reason\": \"unauthorized\"\n}\n```\n\n# POST /session/\n\nIf a user has a valid session, you can post a JSON object to it and it will be\nstored for future access\n\n# POST /logout/\n\nDeletes a current users session\n\n# REQUEST /db/\n\nIf the user has a current valid session, they will be provided a database in which\nto sync data to, requests to /db/* will be forwarded to a PouchDB (CouchDB) instance\nthat only the current user can access.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouchdb%2Fpouchbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpouchdb%2Fpouchbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpouchdb%2Fpouchbase/lists"}