Im trying to login with an Authorized google account, but i get "Unauthorized" in the app, and this is what i see in the logs:

It returns a success and a second later it returns two Failed Exchange errors.
Here's my code:
auth0.webAuth
.authorize({ scope: 'openid email', connection: 'google-oauth2' })
.then(credentials => console.log(credentials))
.catch(error => console.log(error));
and here is the Failed Exchange raw:
{
"date": "2017-07-13T14:41:50.767Z",
"type": "feacft",
"description": "Unauthorized",
"connection_id": "",
"client_id": "xxxx",
"client_name": null,
"ip": "xxxx",
"user_agent": "com.<appname>.<appname>/8 CFNetwork/808.2.16 Darwin/16.0.0",
"user_id": "",
"user_name": "",
"auth0_client": {
"name": "react-native-auth0",
"version": "1.0.3"
},
"log_id": "xxxx"
}
The same account works fine when i use react-native-lock to login.
@ignaciosantise could it be that you are using Auth0's developer keys for Google?
@hzalaz im really not sure, how can i check that?
@ignaciosantise in the Dashboard section for Social connections you should see a warning banner on top or just open google connection settings and if its empty you are using auth0's
@hzalaz the google connection is not empty. I tried reinstalling the Authorization Extension but now i get 'Authorization Extension: Invalid API Key'. Should i close this issue and open another one?
On the other hand, do you know what is the problem now?
@ignaciosantise I personally don't have a lot of details on the inner workings of the extensions and seems a bit unrelated to the library, I'd advise contacting our support team via https://support.auth0.com since they will be better equipped to see whats wrong with you.
@hzalaz I solved the API Key problem, and now im getting the first error again. In the logs i see a successfull login followed by two 'Failed Exchange' errors. The curious thing is that in a previous version of my app i use react-native-lock and it works perfectly
@ignaciosantise its odd since I cannot reproduce that. Did you try with our samples to isolate the issue to our sdk or your app?
@hzalaz I just tried with auth0 sample app and i get the same error. One 'Success Login' followed by two 'Failed Exchange'
Odd, can't repro it here. Can you contact support and supply them with your tenant information so they can take a look since its not great to ask that information here
You can contact support in https://support.auth0.com
Thanks for your time! I finally solved the problem by changing the prop 'Client Type' to Native.

I was deploying apps from CLI and got this error. Solution was to change the value to something else and then back to native again.
Seems like an issue with auth0-deploy-cli that it fails to set the value properly.
So @nilobarp 's suggestion worked for me too, which is pretty concerning. We loaded our app in via the github extension so the app was not added via manage.auth0.com. It kept failing checking the code with client_name null. The fix was to change the type to something else, and change it back.. then everything started working. This seems like a sizable auth0 bug. Though not particularly related to this library directly.
@paulfalgout
Thanks for your comment. Without your hint, I could not found the reason for that. In my case, token_endpoint_auth_method attribute was missed when the client has created through the management API. Appling that attribute through the management API solved the issue.
See
https://community.auth0.com/t/failed-exchange-feacft-until-the-client-is-saved-through-auth0-dashboard-manually/51264 for more detail.
Most helpful comment
I was deploying apps from CLI and got this error. Solution was to change the value to something else and then back to native again.
Seems like an issue with auth0-deploy-cli that it fails to set the value properly.