We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b24db81 commit 2f293abCopy full SHA for 2f293ab
src/services/github/get-device-code.ts
@@ -1,11 +1,16 @@
1
-import { GITHUB_BASE_URL, GITHUB_CLIENT_ID } from "~/lib/api-config"
+import {
2
+ GITHUB_APP_SCOPES,
3
+ GITHUB_BASE_URL,
4
+ GITHUB_CLIENT_ID,
5
+} from "~/lib/api-config"
6
import { HTTPError } from "~/lib/http-error"
7
8
export async function getDeviceCode(): Promise<DeviceCodeResponse> {
9
const response = await fetch(`${GITHUB_BASE_URL}/login/device/code`, {
10
method: "POST",
11
body: JSON.stringify({
12
client_id: GITHUB_CLIENT_ID,
13
+ scope: GITHUB_APP_SCOPES,
14
}),
15
})
16
0 commit comments