I have a nativescript app that I'm using to login to Microsoft AD through Oauth2.0. The issue I'm having is once the user signs in through the webview that shows up on Android, the webview does not close, instead the loading spinner keeps spinning.
If I close the webview manually and then press sign in again, the user shows up as 'Signed in' but the callback is never completed and the token never gets back.
I have configured a custom URI scheme in the manifest like this:
<data android:path="/auth" android:scheme="msalb43ddc9a-94c3-4208-896e-238111882850"/>
(I know there's more code to this but its boilerplate)
And in my apps.dev.microsoft.com I have everything configured to work with this by default.
I also have configured the redirect in my request as such:
openIdSupport: 'oid-full',
clientId: 'b43ddc9a-94c3-4208-896e-238111882850',
redirectUri: 'msalb43ddc9a-94c3-4208-896e-238111882850://auth',
urlScheme: 'msalb43ddc9a-94c3-4208-896e-238111882850',
scopes: ['openid']
On iOS the callback works and I get the token back.
The browser tab should close automatically when the auth succeeds and Azure AD B2C calls back to the app. It's possible the you have mis-configured your app or their is a bug in the specific browser you're using (we've seen this before on smaller browsers, so the data could help). With respect to Azure AD B2C, I'd highly discourage using WebViews as Google and other identity providers explicitly disable WebView support.
I'd recommend you to enable logging and share with me the log file.
We have a doc here that highlights some of the different UI and how to enable each of them: https://github.com/AzureAD/microsoft-authentication-library-for-android/wiki/Customizing-Browsers-&-WebViews
Please check and see if it helps.