64
Views
1
Comments
[Single Sign-On Mobile] In PWAs "Cordova is not available”
single-sign-on-mobile
Mobile icon
Forge asset by OutSystems
Application Type
Mobile
Service Studio Version
11.54.50 (Build 63188)

I need to get a persistent login in a mobile application. I'm using Single Sign-On Mobile plugin with the corporate IdP of the customer (Ping Federate).

When I try the native app all works properly, but when I try the PWA version the CheckSSOPlugin action returns the error "Cordova is not available".

Checking the code of the demo app,

Single Sign-On Mobile -Demo (App) > SSOSampleApp (Module) > Common (UI Flow) > Login (Screen) > OnReady (Screen Action)

I realized that in PWA the plugin is not used. And therefore the execution of the screen action SSOOnClick never arrive to the server action User_Login_Mobile where it's defined the Remember Login propertie, that allows the persistent login.

I try to avoid the IsNative check and I get the above error from the CheckSSOPlugin action about Cordova. I have check this behaviour also in my personal environment without and IdP configured and the error si the same. This message appears when the screen Login is ready "OS-PLUG-SSO-0001: Cordova is not available".

In the details of the Single Sign-On Mobile plugin you can read that the plugin works in PWA, but like I have explained this is not quite right.

Attached are screenshots of the above mentioned screen actions.

Can you please help me?



OnReady.png
SSOOnClick.png
2024-08-22 14-49-23
Edgar Fabiano

If this CheckSSOPlugin action comes from a Cordova plugin you won't be able to use it in the PWA, and the reason for that is because the PWA's are essentially web apps dressed as a mobile app.

Since Cordova plugins enable capabilities of the mobile device, they can't be tested/used in the browser, that's why the app has an "IsNative" check and you're getting that error (Cordova is not defined) when you skip it.

To resolve this, it's likely necessary to generate builds for your application (APK for Android and IPA for iOS) and test the functionality on a mobile device to ensure compatibility with the native environment and allow proper utilization of Cordova plugins. Or you can change your SSO method not to rely on a Cordova plugin, like Oauth 2.0 or SAML.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.