React-native-auth0: A0Auth0 object undefined

Created on 13 Jul 2017  路  5Comments  路  Source: auth0/react-native-auth0

I installed react-native and this library but when I tried running I got:

[TypeError: undefined is not an object (evaluating 'A0Auth0.oauthParameters')]

I tried looking into this and it seems that in webauth/index.js on line 11 the react-native object NativeModules does not contain A0Auth0. I looked into the react-native repo code and found no mention of A0Auth0 so maybe this repo isn't compatible with the latest version of react-native?

What's the fix for this?

All 5 comments

@Abdisalan did you follow the install instructions detailed in the README?

Yes, I added the changes to my AppDelegate.m and added the xml piece to my Info.plist file.

@Abdisalan and react-native link react-native-auth0?

Oh I forgot that step! That fixed it. Thank you

For those of you experiencing the same problem but you are sure you run react-native link react-native-auth0, try:

  • react-native unlink react-native-auth0
  • react-native link react-native-auth0

It will unlink the project first, then link it again ... it's the way I solved this for Android. I had used react-native-lock previously and there was "some problem" when first running link for react-native-auth0.

Hope it helps someone.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

datvtwkm picture datvtwkm  路  3Comments

reinvanimschoot picture reinvanimschoot  路  3Comments

BrightonWeBill picture BrightonWeBill  路  12Comments

a-jumping425 picture a-jumping425  路  5Comments

ricbermo picture ricbermo  路  10Comments