launch
Launches a URL in a browser tab and waits for authentication to complete.
This method handles the complete lifecycle of a browser-based authentication flow:
Launches the appropriate browser tab (Auth Tab or Custom Tab based on device support and URI scheme)
Waits for the authentication process to complete
Returns the redirect URI containing authentication results
The method uses a mutex lock to ensure only one browser launch can happen at a time.
Return
A Result containing the redirect Uri with authentication results on success, or an appropriate exception on failure.
Parameters
The authentication URL to launch in the browser.
The URI to which the authentication server should redirect after completion. If not provided, the global redirectUri property is used.