@botdocs/cli 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/login.js +2 -6
- package/package.json +1 -1
package/dist/commands/login.js
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { saveAuth } from '../lib/config.js';
|
|
2
|
-
const
|
|
2
|
+
const DEFAULT_GITHUB_CLIENT_ID = 'Ov23lizUYDKJOhumsyee';
|
|
3
|
+
const GITHUB_CLIENT_ID = process.env.GITHUB_CLIENT_ID || process.env.GITHUB_ID || DEFAULT_GITHUB_CLIENT_ID;
|
|
3
4
|
export async function login(options) {
|
|
4
|
-
if (!GITHUB_CLIENT_ID) {
|
|
5
|
-
console.error('Error: GitHub Client ID not configured.\n' +
|
|
6
|
-
'Set GITHUB_CLIENT_ID or GITHUB_ID environment variable.');
|
|
7
|
-
process.exit(1);
|
|
8
|
-
}
|
|
9
5
|
// Step 1: Request device code
|
|
10
6
|
const deviceResponse = await fetch('https://github.com/login/device/code', {
|
|
11
7
|
method: 'POST',
|