Issue logging in from mobile App on android devices IONIC + android issue
aanandi-vats opened this issue · 1 comments
Important:- Our app is created in IONIC framework (with Cordova) and we have user OIDC for OKTA authentication.
Please note: We are using latest version of IONIC (IONIC 6) and Angular (Angular 12). The authentication works seamless on IOS. Only some of the Android devices have reported this problem.
We have used @oktadev/schematics & OpenID Connect.
The error (information below) is observed only with some Android devices. The same user when used with other Android devices is authenticated successfully and is signed in to the app.
Steps on how the error was found:
Step 1: Install the APP on Android device.
Step 2: Enter the login details
Step 3: The app redirects the user to the OKTA authentication page.
Step 4: When the user enters the correct password, the browser is closed and the user is redirected to the app.
Here, we attached breakpoints in the authentication process to get into the details of why the user is not logged in to the app.
When the authorization request is completed, it is calling the function “completeAuthorizationRequest”, and in this function, an error was observed which is “Handle Not Available”, screenshot below:
When we bypassed this error, we were redirected to the OnSignInSuccess method, and the action received was “Sign In Failed”.
So even after the user has successfully logged in on the OKTA authentication page, the action received is still “Sign In Failed”.
Key points to note:
-
After this step, the user has no choice but to kill the APP.
-
When he kills the app and launch it again, the user inputs the LoginName again.
As soon as he enters the LoginName, he is redirected to the OKTA page and immediately returned back to the app stating he is authenticated successfully (I believe it’s because the token is set in the storage). -
We are unable to create the HAR file because it’s not being generated when we are debugging it through the code.
I've tested the functionality of this project on an Android emulator and it works. It sounds like you might have some issues with Ionic AppAuth rather than this project.
Since this is an unsupported Okta project, I'd suggest you contact developers@okta.com and ask for help.