Skip to content

Commit 45c83db

Browse files
committed
fix: oauth device flow scopes
Correct the name of POST variable sent during OAuth device flow as documented in the GitHub API docs. https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/authorizing-oauth-apps#step-1-app-requests-the-device-and-user-verification-codes-from-github
1 parent f35789d commit 45c83db

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

githubkit/auth/oauth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def create_device_code(
3636
url = base_url.copy_with(raw_path=base_url.raw_path + b"login/device/code")
3737
body = {"client_id": client_id}
3838
if scopes:
39-
body["scopes"] = " ".join(scopes)
39+
body["scope"] = " ".join(scopes)
4040
response = yield httpx.Request(
4141
"POST",
4242
url,

0 commit comments

Comments
 (0)