{"id":18878569,"url":"https://github.com/verida/vault-auth-server","last_synced_at":"2026-03-09T19:07:05.077Z","repository":{"id":46935380,"uuid":"299855585","full_name":"verida/vault-auth-server","owner":"verida","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-14T00:49:00.000Z","size":413,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-01T00:07:56.756Z","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":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/verida.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"license.md","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":"2020-09-30T08:26:13.000Z","updated_at":"2024-05-14T00:48:59.000Z","dependencies_parsed_at":"2024-05-14T01:59:33.962Z","dependency_job_id":null,"html_url":"https://github.com/verida/vault-auth-server","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verida%2Fvault-auth-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verida%2Fvault-auth-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verida%2Fvault-auth-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/verida%2Fvault-auth-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/verida","download_url":"https://codeload.github.com/verida/vault-auth-server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242198678,"owners_count":20088080,"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-08T06:28:08.359Z","updated_at":"2026-03-09T19:07:00.024Z","avatar_url":"https://github.com/verida.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Vault Auth Server\n\nA web socket server that bridges connections between a mobile device and a web page to enable secure, single sign on using private blockchain keys stored on the mobile device.\n\n## Usage\n\n```\nnpm run start\n```\n\n### Configuration\n\nThere is an example configuration file located in `src/config/index.example.js`. Copy this file to `src/config/index.js`.\n\nYou must update `AUTH_URI` to match the domain name / IP address of the server. You will also need to configure the Auth Client library to use this value as the `serverUri`. See [Verida Connect SDK / Getting Started / Configuration](https://developers.verida.io/docs/single-sign-on-sdk/getting-started#configuration).\n\nYou must configure each application this server will support in the `CONTEXTS` section. You can specify a different private key per context. All data is encrypted and signed using the private key. This enables the data to be decrypted by the end user and in the future, will enable Application Contexts to be registered to specific keys, providing enhanced man-in-the-middle attack protection.\n\nYou must specify valid `DID_CLIENT_CONFIG` if you are registering a new Verida Account (DID) with the private key of a context. See [Client SDK / Authentication / Private Key](https://developers.verida.io/docs/client-sdk/authentication#2-private-key).\n\n# Security\n\nThe configuration file allows you to provide the private key of a valid blockchain account that can sign messages relating to the login process.\n\nThere is a `loginOrigin` property that, if specified, will check the `origin` HTTP header from each socket request to ensure it's coming from the expected domain. This ensures third party websites can't easily request valid authentication tokens. This also ensures third party websites can be prevented from using the resources of any auth server that is running.\n\nMalicious third parties could obtain a token by spoofing the `origin` HTTP header and then presenting that to the user. However, this `loginOrigin` property is passed inside the encrypted payload to the Verida Vault and is displayed to the user. This allows the user to visually verify the domain name they are currently on matches the domain name displayed on the Verida Vault login screen. In the future, the Verida Trust Framework will add an additional layer of security by matching on chain metadata against the public key and domain name used to sign the payload.\n\n# Production\n\nWe recommend using [PM2](https://www.npmjs.com/package/pm2) package to manage running the server.\n\nStarting the server:\n\n```\n$ cd \u003cvault-auth-server-location\u003e\n$ pm2 start ~/.nvm/versions/node/v12.14.1/bin/yarn --name vault-auth-server -- serve\n```\n\nRestarting the server:\n\n```\n$ pm2 restart vault-auth-server -- serve\n```\n\nStopping the server:\n\n```\n$ pm2 stop vault-auth-server -- serve\n```\n\nMonitoring the server:\n\n```\n$ pm2 monit\n```\n\nIt's also recommended to install `pm2-logrotate` which is useful to manage logs on the server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverida%2Fvault-auth-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fverida%2Fvault-auth-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fverida%2Fvault-auth-server/lists"}