Open jordanranson opened 1 year ago
I faced exactly the same issue with an AppLink domain and ended up making it work by adding the net.openid.appauth.RedirectUriReceiverActivity
like you did but I had to remove the original intent-filter from the MainActivity
. Hope that helps!
Description
Hello, thanks for taking the time to look at my request. I'm not a mobile developer and have been banging my head against the wall for a few days now trying to figure out why I would get a
USER_CANCELLED
error when the oAuth flow appears to be working in the app. I'd appreciate any hints or advice on what I can do to get this working. I even followed the additional instructions for USER_CANCELLED issues that are mentioned here (https://github.com/moberwasserlechner/capacitor-oauth2#android-1), but no luck (I am not using Azure).Thanks!
Issue:
Getting "USER_CANCELLED" error with Google oAuth2 in Android Simulator but everything seems to be setup correctly and the oAuth flow successfully completes in the simulator.
Example flow:
OAuth2Client.authenticate
USER_CANCELLED
error coming from rejected promise in JavaScript/LogCat console. No additional details. I do not have access to oAuth logs on Google's side at the moment.LogCat output:
JS Console output:
Capacitor version:
Run
npx cap doctor
:Latest Dependencies:
@capacitor/cli: 4.6.2 @capacitor/core: 4.6.2 @capacitor/android: 4.6.2 @capacitor/ios: 4.6.2
Installed Dependencies:
@capacitor/core: 3.4.3 @capacitor/ios: 3.4.3 @capacitor/cli: 3.4.3 @capacitor/android: 3.4.3
Affected Platform(s):
Android
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"