Datasette plugin that authenticates users against GitHub
Project description
datasette-auth-github
Datasette plugin that authenticates users against GitHub.
This requires datasette master - it uses unreleased plugin hooks.
Usage instructions:
- Install the plugin
- Create a GitHub OAuth app: https://github.com/settings/applications/new
- Set the Authorization callback URL to
http://127.0.0.1:8001/-/auth-callback
- Create a
metadata.json
file with the following structure:
{
"title": "datasette-auth-github demo",
"plugins": {
"datasette-auth-github": {
"client_id": {"$env": "GITHUB_CLIENT_ID"},
"client_secret": {"$env": "GITHUB_CLIENT_SECRET"}
}
}
}
Now you can start Datasette like this, passing in the secrets as environment variables:
$ GITHUB_CLIENT_ID=XXX GITHUB_CLIENT_SECRET=YYY datasette \
fixtures.db -m metadata.json
Note that hard-coding secrets in metadata.json
is a bad idea as they will be visible to anyone who can navigate to /-/metadata
. Instead, we use a new mechanism for adding secret plugin configuration options.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for datasette_auth_github-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c339327eab1899294b89f6d18290842285a6d189ad25a9b88a72d24d98178bc |
|
MD5 | 7f8ab1938e8234ccdb55bcbb37c1c2dd |
|
BLAKE2b-256 | b726153364b7b4cad8b94ab2bc3af8230a42d6ffba28bada534a0beb15c18f3d |