0.0.5 • Published 3 years ago
react-native-ldapts v0.0.5
LDAPts
LDAP client for React Native based on LDAPts.
Note
This is forked from LDAPts with some dependency changes to allow usage in React Native
It requires certain react native compatible libraries to be installed in order for this to work.
Required dependencies
npm install --save react-native-tcp node-libs-react-native react-native-get-random-values
Add the following into metro.config.js
// metro.config.js
module.exports = {
resolver: {
extraNodeModules: require('node-libs-react-native'),
},
};
Add the following to the top of the entry index.js
for react native
import 'node-libs-react-native/globals';
import 'react-native-get-random-values';
// ...
import App from './App.ts';
Known Issues
There seems to be a duplicated dependency issue with the react-native-tcp library that was used on iOS where multiple TcpSockets is getting linked.
- In order to get it to work,
- Go to xcode
- into project navigator, click on Pods folder
- then select TcpSockets in targets
- Go to Build Phases > Compile sources
- remove reference to CocoaAsyncSocket
- In order to get it to work,
TLS doesn't work now as I couldn't find any react-native compatible tls library to swap with.
Usage
See LDAPts README on how to use the library