Skip to main content

Datasette plugin that authenticates users by passing their cookies to an API

Project description

datasette-auth-cookie-api

PyPI CircleCI License

Datasette plugin that authenticates users by passing their cookies to an external API.

STATUS: Work in progress. This is currently insecure. Do not use it.

When to use this

This plugin allows you to build custom authentication for Datasette when you are hosting a Datasette instance on the same domain as another, authenticated website.

Consider a website on www.example.com which supports user authentication.

You could run Datasette on data.example.com in a way that lets it see cookies that were set for the .example.com domain.

Using this plugin, you could build an API endpoint at www.example.com/user-for-cookies which returns a JSON object representing the currently signed-in user, based on their cookies.

The plugin can protect any hits to any data.example.com pages by passing their cookies through to that API and seeing if the user should be logged in or not.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for datasette-auth-cookie-api, version 0.1a0
Filename, size File type Python version Upload date Hashes
Filename, size datasette_auth_cookie_api-0.1a0-py3-none-any.whl (10.1 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page