Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Visit `/-/actor` when signed in to see the shape of the authenticated actor. It
```json
{
"actor": {
"id": "github:9599",
"display": "simonw",
"gh_id": "9599",
"gh_name": "Simon Willison",
Expand Down Expand Up @@ -106,7 +107,7 @@ Note that GitHub allows users to change their username, and it is possible for o
```json
{
"allow": {
"gh_id": "9599"
"id": "github:9599"
}
}
```
Expand Down
1 change: 1 addition & 0 deletions datasette_auth_github/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ async def github_auth_callback(datasette, request, scope, receive, send):
except ValueError:
return await response_error(datasette, "Could not load GitHub profile")
actor = {
"id": "github:{}".format(profile["id"]),
"display": profile["login"],
"gh_id": str(profile["id"]),
"gh_name": profile["name"],
Expand Down
1 change: 1 addition & 0 deletions tests/test_datasette_auth_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ async def test_github_auth_callback(ds, mocked_github_api):
)
actor = ds.unsign(response.cookies["ds_actor"], "actor")["a"]
assert {
"id": "github:123",
"display": "demouser",
"gh_id": "123",
"gh_name": "GitHub User",
Expand Down