Closed rcorrie closed 7 months ago
This is only occurring on my Android device. When I call openAuth, the promise is never resolved.
openAuth
I inspected my Android Chrome session, and I see this error in the console:
Here is the code I use to launch openAuth
const result = await InAppBrowser.openAuth(url, AUTH_REDIRECT_URI, { // iOS Properties ephemeralWebSession: false, enableBarCollapsing: true, // Android Properties showTitle: false, enableUrlBarHiding: true, enableDefaultShare: false, showInRecents: true, toolbarColor: Theme.primaryDarker, secondaryToolbarColor: Theme.primaryDarker, navigationBarColor: Theme.primaryDarker, navigationBarDividerColor: Theme.primaryDarkest, }) if (result?.type === 'success' && result.url) { Linking.openURL(result.url) }
I have made sure that I added my url scheme in AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <uses-permission android:name="android.permission.INTERNET" /> <application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/BootTheme"> <activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:exported="true"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="myapp"/> </intent-filter> </activity> </application> </manifest>
Closing this issue, I found a small typo in my redirectUri. Fixing that solved my issue.
This is only occurring on my Android device. When I call
openAuth
, the promise is never resolved.I inspected my Android Chrome session, and I see this error in the console:
Here is the code I use to launch
openAuth
I have made sure that I added my url scheme in AndroidManifest.xml: