diff --git a/datasette/app.py b/datasette/app.py index fd28a016..f3cb8876 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -475,7 +475,7 @@ class Datasette: restrict_database: Optional[Dict[str, Iterable[str]]] = None, restrict_resource: Optional[Dict[str, Dict[str, Iterable[str]]]] = None, ): - token = {"a": actor_id, "token": "dstok", "t": int(time.time())} + token = {"a": actor_id, "t": int(time.time())} if expires_after: token["d"] = expires_after diff --git a/datasette/templates/create_token.html b/datasette/templates/create_token.html index a94881ed..a39d6ecb 100644 --- a/datasette/templates/create_token.html +++ b/datasette/templates/create_token.html @@ -2,11 +2,36 @@ {% block title %}Create an API token{% endblock %} +{% block extra_head %} + +{% endblock %} + {% block content %}
This token will allow API access with the same abilities as your current user.
+This token will allow API access with the same abilities as your current user, {{ request.actor.id }}
+ +{% if token %} +{{ token_bits|tojson(4) }}
+ {{ token_bits|tojson }}
-