datasette-auth-osm
Datasette plugin that authenticates users against OpenStreetMap
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-auth-osm
Demo
You can try this out at datasette-auth-osm-demo.fly.dev - click on the top right menu icon and select "Sign in with OpenStreetMap".
Initial configuration
First, create a new application in Openstreetmap - OAuth2 Applications. You will need the client ID and client secret for that application.
Add http://127.0.0.1:8001/-/osm-callback to the list of Allowed Callback URLs.
Then configure these plugin secrets using metadata.yml:
plugins:
datasette-auth-osm:
client_id:
"$env": OSM_CLIENT_ID
client_secret:
"$env": OSM_CLIENT_SECRET
In development, you can run Datasette and pass in environment variables like this:
OSM_CLIENT_ID="...client-id-goes-here..." \
OSM_CLIENT_SECRET="...secret-goes-here..." \
datasette -m metadata.yml
Once your Datasette instance is deployed, you will need to add its callback URL to the "Allowed Callback URLs" list your OAuth2 application in OpenStreetMap.
The callback URL should be something like:
https://url-to-your-datasette/-/osm-callback
Example for a permission block to only allow logged in users to see the private.db:
databases:
private:
allow:
osm_id: "*"
The name of the actor field is not id as in the Datasette documentation, but osm_id.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-auth-osm
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest
Metadata
Release files for datasette-auth-osm 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| datasette_auth_osm-0.4.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datasette_auth_osm-0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.1 kB
Release files / datasette_auth_osm-0.4.tar.gz
| Download URL | datasette_auth_osm-0.4.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
845c40318a61427f1ddfee0f187988f5c3101390cf1d60ddc8a8115093aa9a65
|
|
BLAKE2b-256 checksum How to use checksums |
415807d46b6899e48d4247f68158df60454ae0d40eb81cb3197e891eb482cad2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency logRelease files / datasette_auth_osm-0.4-py3-none-any.whl
| Download URL | datasette_auth_osm-0.4-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0b621a421021016e5e7eda5be5703d0160592e5c3135c8c2fe46b1ec3b8b43f
|
|
BLAKE2b-256 checksum How to use checksums |
5b3847a6ec521f3a4e7f21016b0364d20f62565fc7527f4e9b31bdd156be8ff2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.
Transparency log