The issue is,
When I try to login with the API method loginpopup() from msalservice in browser (ionic serve) it works fine and I am able to login
But when I try to run same in android it is always throwing error (error.split is not a function).
any idea ?
Attaching screenshot.
@yashwanth493 Could you go into more detail about what you had to do to make it work? I tried to integrate it like I would for a normal angular application and there are no errors and the MsalGuard route guard is invoked as expected, but after a successful login and redirect to the Ionic app the login state is still null. Since msal-angular is (as far as I know) built for the Angular routing module and Ionic probably overrides this I assumed that the hook into the routing module which receives the successful login from Azure AD/B2C is just never handled. Would be glad for any insight since Iâm currently blocked in implementing this. Thanks.
@Pharao2k For MSAL login in ionic the redirect_url is having some issues, ionic doesnât read the callback redirect url and it remains in the password screen even after login success. So the same thing can be achieved using the ADAL plugin of cordova ionic (https://ionicframework.com/docs/native/ms-adal) .
Iâm using MS adal plugin in a Ionic3 project and its working well and Iâm receiving all the authenticate data from AD. The only problem is, Iâm NOT getting the âonpremisessamaccountnameâ. We are receiving the âonpremisessamaccountnameâ from postman but not in the application.
Is there anything which I need to send in the request??
In Ionic 3, its working fine in my project. As per your Ionic 5 console log error, you need to pass the âclient_secretâ id in the request parameter. Could you share the request parameters?
I am trying with MsalService and loginPopup() (as described in Build Angular single-page apps with Microsoft Graph - Microsoft Graph | Microsoft Docs). Everything works well with âionic serveâ but it does not work in device. As soon as it redirects to the login page, the app crashes. I not sure if it would be possible to get with InAppBrowser.
I have the same problem: signing in works fine with ionic serve, but it fails on an Android device. It properly displays the Microsoft Login popup from âhttps : //login.microsoftonline.com/common/reprocess?ctx=[a-long-hash]â, and when I click the âcontinueâ button, it redirects to âhttp : //localhost/login#code=0.AR8A37YNHPGMP0iXW1âŚâ. (which is a very long hash that looks like a refresh token as it starts with â0.â).
Thanks
Even I am trying to integrate IONIC + CAPACITOR + MSAL but having hard time to get it work in mobile apps. Can you share your code/sample to get it working. My app works fine with ionic serve