{"nativeStackAndroid":[],"userInfo":null,"message":"User cancelled flow","code":"authentication_error"}
Venkatesh63740 opened this issue · comments
Please submit the details of your bug report or we will not be able to help you troubleshoot the issue.
See https://github.com/FormidableLabs/react-native-app-auth/blob/main/.github/ISSUE_TEMPLATE/Bug_Report.md for information.
Uploading MicrosoftTeams-video.mp4…
after the login it is redirect to the app it shows two application and when we click the the 1st app
it shows this error
{"nativeStackAndroid":[],"userInfo":null,"message":"Parameter grant_type is directly supported via the authorization request builder, use the builder method instead","code":"run_time_exception"}
if we click 2nd app it shows this error {"nativeStackAndroid":[],"userInfo":null,"message":"User cancelled flow","code":"authentication_error"}.
<uses-permission android:name="android.permission.INTERNET" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:exported="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="net.openid.appauth.RedirectUriReceiverActivity"
android:exported="true">
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="com.example.app""
android:path="/callback"/>
</intent-filter>
</activity>
Please submit the details of your bug report or we will not be able to help you troubleshoot the issue.
See https://github.com/FormidableLabs/react-native-app-auth/blob/main/.github/ISSUE_TEMPLATE/Bug_Report.md for information.
Each provider has specific configurations that are required. Without knowing your configuration, it will be difficult to help you. Please provide the information required in the Bug Report Template.
MicrosoftTeams-video.mp4
using react native 0.66 and "react-native-app-auth": "^6.4.3",
Androidmanefist.xml
<uses-permission android:name="android.permission.INTERNET" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:exported="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="net.openid.appauth.AuthorizationManagementActivity"
>
<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="com.example.appname" android:host="callback" />
</intent-filter>
</activity>
build.gradle:
manifestPlaceholders = [appAuthRedirectScheme: "com.example.appname"]
my config:
{
"additionalParameters": {
"grant_type": "authorization_code"
},
"clientId": "{clientid}",
"clientSecret": "{secretkey}",
"issuer": "https://{myoktasiteurl}/oauth2/default",
"redirectUrl": "com.example.appname:/callback",
"responseTypes": "code",
"scopes": [
"openid",
"profile",
"offline_access"
],
"serviceConfiguration": {
"authorizationEndpoint": "https://{myoktasiteurl}/oauth2/default/v1/authorize",
"endSessionEndpoint": "https:/{myoktasiteurl}/oauth2/default/v1/logout",
"tokenEndpoint": "https://{myoktasiteurl}/oauth2/default/v1/token"
},
"useNonce": false,
"usePKCE": true
}
working fine in iOS but android, it was not redirecting to my app after the login and after while login the okta site from the app if we close and open the app it shows {"nativeStackAndroid":[],"userInfo":null,"message":"User cancelled flow","code":"authentication_error"}
This is iOS config:
CFBundleURLName $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleURLSchemes {myoktasiteurl}