sheetlink 0.1.4 → 0.1.5
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/package.json +1 -1
- package/src/commands/auth.js +2 -2
package/package.json
CHANGED
package/src/commands/auth.js
CHANGED
|
@@ -21,7 +21,7 @@ import { getTierStatus, listItems } from '../api.js';
|
|
|
21
21
|
const GOOGLE_CLIENT_ID = '967710910027-j88nejbs5rnjb5b4801er8sffkv4crdb.apps.googleusercontent.com';
|
|
22
22
|
const GOOGLE_CLIENT_SECRET = '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';
|
|
23
23
|
const REDIRECT_PORT = 9876;
|
|
24
|
-
const REDIRECT_URI = `http://localhost:${REDIRECT_PORT}
|
|
24
|
+
const REDIRECT_URI = `http://localhost:${REDIRECT_PORT}`;
|
|
25
25
|
|
|
26
26
|
export async function cmdAuth(options) {
|
|
27
27
|
// --- API key path ---
|
|
@@ -87,7 +87,7 @@ async function googleOAuthFlow() {
|
|
|
87
87
|
const server = http.createServer((req, res) => {
|
|
88
88
|
const url = new URL(req.url, `http://localhost:${REDIRECT_PORT}`);
|
|
89
89
|
|
|
90
|
-
if (url.pathname === '/callback') {
|
|
90
|
+
if (url.pathname === '/' || url.pathname === '/callback') {
|
|
91
91
|
const code = url.searchParams.get('code');
|
|
92
92
|
const returnedState = url.searchParams.get('state');
|
|
93
93
|
const error = url.searchParams.get('error');
|