Closed dpogoda closed 5 years ago
Could be related to this issue https://github.com/auth0/react-native-auth0/issues/83
I could fix the problem. I had to add to the following code into my activity class:
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
mReactInstanceManager.onNewIntent(intent);
}
I am seeing this same issue. ~Would an improper Callback URL result in this? The instructions are a little confusing on what to use. I took this word for word:~
~{YOUR_APP_PACKAGE_NAME}://YOUR_AUTH0_DOMAIN/android/{YOUR_APP_PACKAGE_NAME}/callback
~
~And didn't add an http or https identifier as I'm not sure where it's supposed to go?~
Edit: Disregard that, I just tried changing the Callback URL and realized it results in a totally separate error.
Final Edit: Realized that my android:launchMode="singleTask"
was in the wrong header section. Looking at the Manifest pointed above, it looks like you don't have that issue. Sorry I couldn't be of more help.
@pythoneer I can confirm that PR #93 does not appear to be the fix for this case.
Is this still an issue?
I'm currently experiencing the same issue. I've got android:launchMode="singleTask"
set on my manifest.
The callback URL seems to be triggering - i.e. it returns from the CustomTab. But it doesn't seem to be picking up the actual callback function and instead shows the same error as above
{"error": "a0.session.user_cancelled",
"error_description": "User cancelled the Auth"}
Following up - if I remove android:launchMode="singleTask"
from the manifest, and use Linking.getInitialURL()
I can see that the callback URL is being correctly triggered and returns the code parameter.
Has anyone managed to get this working?
RNAuth0 1.3.0 RNNavigation 2.0.2538
Edit: Managed to get this working! I mistakenly had android:launchMode="singleTask"
under <application>
and not <activity>
.
@kevinranks did the same, ty!
Just FYI, redirection in android might not work when this SDK is used along the RN Navigation library. This is due to how the deep links work on react-native.
Just FYI, redirection in android might not work when this SDK is used along the RN Navigation library. This is due to how the deep links work on react-native.
@lbalmaceda any ideas on how to get it to work when using React Navigation? I am running into this issue currently and have not been able to find a solution
Same here, can we re-open this issue and get it figured out?
Hi, I've integrated my react-native app including the react-native-auth0 library into an existing Android project following this tutorial https://facebook.github.io/react-native/docs/integration-with-existing-apps.html.
The integration worked almost perfectly. But when I try to login, the custom tab intent starts and after a short while I get redirected to my login screen and I get the following error
{"error": "a0.session.user_cancelled", "error_description": "User cancelled the Auth"}.
When I check the auth0 dashboard at www.auth0.com , I can see that the login was actually successful. So there must be a redirection error. The callback URL is correct.
I followed the react-native-auth0 guide and applied launchMode="singleTask" to the respective activity etc. Also I tried different versions of chromeTabs.
The thing is that the login part works perfectly in my stand-alone react-native project. My instinct says that it has to do something with the gradle config. On the other hand I tried different versions, downgraded the project to 23.0.1 etc.
I'm using react-native-auth0 1.2.1 react-native 0.50.3 and I don't know if it is important react-native-router-flux 4.0.0-beta.24
My ReactActivity in the AndroidManifest.xml is configured as follows:
This is my build.gradle (Module: app)
This is my build.gradle (Project:android)