فهرست منبع

Return focus to app after Google OAuth callback.

Activate the macOS app as soon as the loopback redirect arrives so users are brought back immediately instead of staying on the browser page.

Made-with: Cursor
huzaifahayat12 3 ماه پیش
والد
کامیت
cd581796a0
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      meetings_app/Auth/GoogleOAuthService.swift

+ 4 - 0
meetings_app/Auth/GoogleOAuthService.swift

@@ -389,6 +389,10 @@ private final class OAuthLoopbackServer {
 
             if let parsedURL {
                 self.callbackURL = parsedURL
+                DispatchQueue.main.async {
+                    // Bring the app back to foreground once OAuth redirects.
+                    NSApp.activate(ignoringOtherApps: true)
+                }
                 if let continuation = self.callbackContinuation {
                     self.callbackContinuation = nil
                     continuation.resume(returning: parsedURL)