sheetlink 0.1.6 → 0.1.8
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 +3 -1
package/package.json
CHANGED
package/src/commands/auth.js
CHANGED
|
@@ -135,6 +135,7 @@ async function googleOAuthFlow() {
|
|
|
135
135
|
</style>
|
|
136
136
|
</head>
|
|
137
137
|
<body>
|
|
138
|
+
<script>history.replaceState(null, '', '/');</script>
|
|
138
139
|
<div class="card">
|
|
139
140
|
<div class="icon">
|
|
140
141
|
<svg width="24" height="24" fill="none" stroke="#059669" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24">
|
|
@@ -146,6 +147,7 @@ async function googleOAuthFlow() {
|
|
|
146
147
|
</div>
|
|
147
148
|
</body>
|
|
148
149
|
</html>`);
|
|
150
|
+
server.closeAllConnections?.();
|
|
149
151
|
server.close();
|
|
150
152
|
|
|
151
153
|
if (error) return reject(new Error(`OAuth error: ${error}`));
|
|
@@ -171,7 +173,7 @@ async function googleOAuthFlow() {
|
|
|
171
173
|
});
|
|
172
174
|
|
|
173
175
|
server.on('error', reject);
|
|
174
|
-
setTimeout(() => { server.close(); reject(new Error('OAuth timeout (2 minutes)')); }, 120_000);
|
|
176
|
+
setTimeout(() => { server.closeAllConnections?.(); server.close(); reject(new Error('OAuth timeout (2 minutes)')); }, 120_000);
|
|
175
177
|
});
|
|
176
178
|
}
|
|
177
179
|
|