File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
src/Packages/Passport/Runtime/Scripts/Public Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public class PassportUI : MonoBehaviour
8585
8686 [ Header ( "WebView Settings" ) ]
8787 [ Tooltip ( "URL to load in the WebView for authentication." ) ]
88- [ SerializeField ] private string webViewUrl = "http ://localhost:3001 " ;
88+ [ SerializeField ] private string webViewUrl = "https ://auth.immutable.com/im-embedded-login-prompt?isWebView=true&client_id=YOUR_CLIENT_ID " ;
8989
9090 /// <summary>
9191 /// Gets or sets the URL to load in the WebView for authentication
@@ -198,6 +198,7 @@ private void CreateWebView()
198198 // Register JavaScript methods
199199 webView . RegisterJavaScriptMethod ( "HandleLoginData" , HandleLoginData ) ;
200200 webView . RegisterJavaScriptMethod ( "HandleLoginError" , HandleLoginError ) ;
201+ webView . RegisterJavaScriptMethod ( "CloseWebView" , ( data ) => HideLoginUI ( ) ) ;
201202
202203 isInitialized = true ;
203204 PassportLogger . Info ( $ "{ TAG } Cross-platform WebView created successfully") ;
@@ -511,15 +512,6 @@ public void HideLoginUI(bool logMessage = true)
511512 PassportLogger . Info ( $ "{ TAG } Login UI hidden") ;
512513 }
513514 }
514-
515- // CRITICAL: Re-enable the bridge WebView GameObject now that UI is hidden
516- if ( bridgeWebViewGameObject != null && ! bridgeWebViewGameObject . activeSelf )
517- {
518- bridgeWebViewGameObject . SetActive ( true ) ;
519- PassportLogger . Info ( $ "{ TAG } Re-enabled bridge WebView { bridgeWebViewGameObject . name } - UI WebView is now hidden") ;
520- bridgeWebViewGameObject = null ; // Clear reference
521- }
522-
523515 }
524516
525517 /// <summary>
You can’t perform that action at this time.
0 commit comments