When deployed to an actual device, the AuthenticationView does not work when a user tries to use Google to authenticate. Below is a screenshot of AppStudio Player working with one of the samples. Is there a workaround?
We found that the AuthenticationView and OAuth2View from ArcGIS Runtime SDK for Qt "import Esri.ArcGISRuntime.Toolkit.Dialogs" is using Qt WebView "import QtWebView 1.1" that does not work with the Google login.
AppStudio AppFramework WebView has solved this limitation from Qt WebView. The workaround is to update the source code of the OAuth2View to use AppStudio AppFramework WebView instead of Qt WebView.
I am showing the way to implement this workaround as if you are using our "OAuth + Biometric Authentication" sample because it can be reproducible on that sample.
- Grab the source code of the AuthenticationView.qml and OAuth2View.qml from ArcGIS Runtime Toolkit Dialog installation. Under your AppStudio Installation folder.
- Add these to files into your project, I am adding these to the "controls" folder for OAuth sample. I renamed these files, by adding "New" to the file name, so that we can make sure that we are loading the updated files.
- On OAuth2ViewNew.qml, comment out the "import QtWebView 1.1" statement and add "import ArcGIS.AppFramework.WebView 1.0"
- On AuthenticationViewNew.qml, line 116, change the "OAuth2View.qml" to load the new file "OAuth2ViewNew.qml"
- On the views/Profile.qml, line 274, make sure to load the new qml file AuthenticationViewNew instead
I tested this and it works on my side, let me know if this is working for you.
Attached are the OAuth2View.qml and AuthenticationView.qml from the Esri ArcGIS Runtime Qt Toolkit.
works like a charm!
Thank you, Matt
Retrieving data ...