leantechnologies / link-sdk-react-native

LinkSDK for React Native
MIT License
5 stars 6 forks source link

Link is failing #21

Closed pratius closed 2 years ago

pratius commented 2 years ago

Hi,

This SDK is always throwing error connections. I have done the below configuration. Please let me know the missing configuration?

<TouchableOpacity style={styles.cta_container} onPress={() => Lean.current.link({ app_token: "myToken", permissions: ["identity", "accounts", "balance", "transactions"], customer_id: "myCustID", sandbox: true, }) } Simulator Screen Shot - iPhone 11 Pro Max - 2022-01-22 at 15 52 56

a-tomlinson commented 2 years ago

@pratius it looks like you're passing in your appToken incorrectly in the sample shared above:

<TouchableOpacity
  style={styles.cta_container}
  onPress={() =>
    Lean.current.link({
      app_token: "myToken",
      permissions: ["identity", "accounts", "balance", "transactions"],
      customer_id: "myCustID",
      sandbox: true,
    })
}

assuming you have myToken as a stored variable, you should remove the " marks on either side so it's:

app_token: myToken

Same applies to the customer id