diff --git a/server/SHServ/Controllers/AuthController.php b/server/SHServ/Controllers/AuthController.php index 27f6201..59713ca 100644 --- a/server/SHServ/Controllers/AuthController.php +++ b/server/SHServ/Controllers/AuthController.php @@ -299,8 +299,9 @@ /** * GET /auth/mobile-bridge - * Renders a page that extracts the token from session and redirects back to the mobile app. - * Used by the Capacitor mobile app after OAuth login. + * Bridge page for Android: attempts an automatic deep-link back into + * the native app via Chrome Intent URL, and falls back to a manual button + * for browsers that block automatic scheme navigation. */ public function mobileBridge() { @@ -324,132 +325,41 @@ $expiresIn = $tokenSet->expiresIn; $tokenEsc = htmlspecialchars($token, ENT_QUOTES, 'UTF-8'); - $intentUrl = 'intent://auth/callback?token=' . $tokenEsc . '&expires_in=' . (int)$expiresIn . '#Intent;scheme=shserv;package=com.gnexus.shserv;end'; return ' - - - - Smart Home — Authentication Complete - - + +Authentication complete + -
-
Authentication complete
-
-

Opening Smart Home app…

-
- -
- - -'; +
+
+

Login successful

+

Opening app…

+ +
+ +'; } }