Skip to content

Commit 2f293ab

Browse files
committed
fix: request device code with scopes
1 parent b24db81 commit 2f293ab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/services/github/get-device-code.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
import { GITHUB_BASE_URL, GITHUB_CLIENT_ID } from "~/lib/api-config"
1+
import {
2+
GITHUB_APP_SCOPES,
3+
GITHUB_BASE_URL,
4+
GITHUB_CLIENT_ID,
5+
} from "~/lib/api-config"
26
import { HTTPError } from "~/lib/http-error"
37

48
export async function getDeviceCode(): Promise<DeviceCodeResponse> {
59
const response = await fetch(`${GITHUB_BASE_URL}/login/device/code`, {
610
method: "POST",
711
body: JSON.stringify({
812
client_id: GITHUB_CLIENT_ID,
13+
scope: GITHUB_APP_SCOPES,
914
}),
1015
})
1116

0 commit comments

Comments
 (0)