Skip to content

Commit f3003f6

Browse files
committed
feat: window.focus() after auth finished
The app has a (short) timeout, while it waits to see if it can use message passing to finish auth. This adds a `window.focus()` call, so that even if the app doesn't close, we can still grab focus right after auth.
1 parent 6bb30af commit f3003f6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/connect/src/auth.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ const setupListener = ({ popup, authRequest, finished, authURL, userSession }: L
106106
const data: FinishedEventData = event.data;
107107
if (data.authRequest === authRequest) {
108108
if (finished) {
109+
window.focus();
109110
const { authResponse } = data;
110111
await userSession.handlePendingSignIn(authResponse);
111112
finished({

0 commit comments

Comments
 (0)