|
1 | 1 | diff --git a/dist/cjs/index.js b/dist/cjs/index.js |
2 | | -index 97a5a25d58584c9bf04997fcec67e29923a0cf76..89a09e487f213c90057779b1670345eb3203e87e 100644 |
| 2 | +index 97a5a25d58584c9bf04997fcec67e29923a0cf76..8fa6d6422188dc720e6de3672ba77e79617526bd 100644 |
3 | 3 | --- a/dist/cjs/index.js |
4 | 4 | +++ b/dist/cjs/index.js |
5 | | -@@ -95,7 +95,7 @@ function setupOAuthTransportIpcHandlers(options) { |
| 5 | +@@ -95,8 +95,8 @@ function setupOAuthTransportIpcHandlers(options) { |
6 | 6 | }); |
7 | 7 | electron.ipcMain.handle(require_ipc.OAUTH_TRANSPORT_CHANNELS.open, async (event, url) => { |
8 | 8 | if (!isMainFrameEvent(event)) throw new Error("Clerk: OAuth request did not originate from a window's main frame."); |
9 | 9 | - if (pendingOAuthFlow) throw new Error("Clerk: an OAuth flow is already pending."); |
10 | | -+ disposePendingOAuthFlow(new Error("Clerk: OAuth flow was replaced by a new one.")); |
11 | 10 | assertExternalOAuthUrl(url); |
| 11 | ++ disposePendingOAuthFlow(new Error("Clerk: OAuth flow was replaced by a new one.")); |
12 | 12 | const window = electron.BrowserWindow.fromWebContents(event.sender); |
13 | 13 | const callbackPromise = new Promise((resolve, reject) => { |
| 14 | + pendingOAuthFlow = { |
14 | 15 | @@ -109,10 +109,11 @@ function setupOAuthTransportIpcHandlers(options) { |
15 | 16 | window |
16 | 17 | }; |
@@ -38,18 +39,19 @@ index 310c21a720e7b5da06ee301f6b51597f081a8179..3518d29e786258065bc5ab92b664ea06 |
38 | 39 | }; |
39 | 40 | if (process.contextIsolated) electron.contextBridge.exposeInMainWorld("__clerk_internal_electron", bridge); |
40 | 41 | diff --git a/dist/esm/index.js b/dist/esm/index.js |
41 | | -index 29284ea0e6325afc72024ec8c2e69ab3cb78ad00..091dc64206c0331b0e3663ee08da1d586b16a08d 100644 |
| 42 | +index 29284ea0e6325afc72024ec8c2e69ab3cb78ad00..80c64fd8dbaefb4a393cc814a273620f77ca76c6 100644 |
42 | 43 | --- a/dist/esm/index.js |
43 | 44 | +++ b/dist/esm/index.js |
44 | | -@@ -94,7 +94,7 @@ function setupOAuthTransportIpcHandlers(options) { |
| 45 | +@@ -94,8 +94,8 @@ function setupOAuthTransportIpcHandlers(options) { |
45 | 46 | }); |
46 | 47 | ipcMain.handle(OAUTH_TRANSPORT_CHANNELS.open, async (event, url) => { |
47 | 48 | if (!isMainFrameEvent(event)) throw new Error("Clerk: OAuth request did not originate from a window's main frame."); |
48 | 49 | - if (pendingOAuthFlow) throw new Error("Clerk: an OAuth flow is already pending."); |
49 | | -+ disposePendingOAuthFlow(new Error("Clerk: OAuth flow was replaced by a new one.")); |
50 | 50 | assertExternalOAuthUrl(url); |
| 51 | ++ disposePendingOAuthFlow(new Error("Clerk: OAuth flow was replaced by a new one.")); |
51 | 52 | const window = BrowserWindow.fromWebContents(event.sender); |
52 | 53 | const callbackPromise = new Promise((resolve, reject) => { |
| 54 | + pendingOAuthFlow = { |
53 | 55 | @@ -108,10 +108,11 @@ function setupOAuthTransportIpcHandlers(options) { |
54 | 56 | window |
55 | 57 | }; |
|
0 commit comments