Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prompt/handles-server
Bluesky handle verification requests server.
https://github.com/prompt/handles-server
bluesky bsky handles
Last synced: about 1 month ago
JSON representation
Bluesky handle verification requests server.
- Host: GitHub
- URL: https://github.com/prompt/handles-server
- Owner: prompt
- License: mit
- Created: 2024-11-17T18:32:14.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-30T08:19:22.000Z (about 1 month ago)
- Last Synced: 2024-11-30T08:31:41.989Z (about 1 month ago)
- Topics: bluesky, bsky, handles
- Language: TypeScript
- Homepage: https://handles.net
- Size: 101 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Handles Server
A very simple server that reponds to Bluesky handle verification requests for
the domain(s) that the server is exposed to, as an alternative to managing
claims via DNS. Configure with a provider, and let it run.> [!IMPORTANT]
> `handles-server` is already serving thousands of Handles in production
> at [Handles Club](https://handles.club) and [handles.net](https://handles.net)
> but as it is not yet v1 it may change.[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fshrink-inc%2Fhandles-server&env=HANDLES_PROVIDER)
```shell
curl -LO https://github.com/prompt/handles-server/releases/download/v0/handles-server-linux
chmod +x handles-server-linux
HANDLES_PROVIDER="map:alice.at.example.com->did:plc:example1" \
./handles-server-linux
```## Providers
The provider is configured using the `HANDLES_PROVIDER` Environment Variable. A
`key` identifies the provider and the `value` configures how the provider will
behave.```shell
HANDLES_PROVIDER="provider:configuration"
```### `HandleMap`
`HandleMap` is an example provider, it serves the comma-separated handle->did
values it has been configured with.```shell
$ HANDLES_PROVIDER="map:alice.at.example.com->did:plc:example1,bob.at.example.com->did:plc:example2" \
./handles-server[00:00:00.000] INFO (0000): Resolved configuration to provider 'map'
[00:00:00.000] DEBUG (0000): Successfully parsed a list of handles.
handles: [
[
"alice.at.example.com",
"did:plc:example1"
],
[
"bob.at.example.com",
"did:plc:example2"
]
]
[00:00:00.000] INFO (0000): Instantiated 'map'
[00:00:00.000] INFO (0000): Listening on 3000
```Make a request passing in the target handle as the `Host`.
```shell
$ curl http://localhost:3000/.well-known/atproto-did --header "Host: alice.at.example.com"
did:plc:example1
```### Postgres
`PostgresHandles` queries a `handles` table (or view) for a `did` identified by
a `handle`. The `HANDLES_PROVIDER` configuration can either point to another
Environment Variable which contains the connection string or it can contain a
connection string itself.```shell
$ HANDLES_PROVIDER="pg:DATABASE_URL" ./handles-server
```### Google Sheets
...