Skip to content

Commit 8cee8ec

Browse files
committed
fix: oauth device flow scopes
Correct the name of variable from scopes to scope in the OAuth device flow implementation 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 8cee8ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)