@alore/auth-react-native-ui
Version:
React Native UI for Alore Auth
88 lines (63 loc) • 2.45 kB
Markdown
<img src="https://storage.googleapis.com/alore_assets/auth-react-native-banner.png" alt="Alore Logo"/>
This is a bare React Native library that provides authentication features. It simplifies the integration of authentication methods in your React Native applications. Additionally, it offers a pre-built UI component that leverages the `@alore/auth-react-native-sdk` to provide Alore authentication and wallet features.
- [Installation](
- [Usage](
- [Contributing](
- [License](
- [Contact](
To install the required libraries, run the following command:
```bash
yarn add react-native-gesture-handler react-native-ui-lib react-native-svg crypto-browserify react-native-get-random-values
```
Then, install this library:
```bash
yarn add @alore/auth-react-native-ui
```
To use the Alore Native Auth UI in your project, follow these steps:
1. Get a free API Key at [https://alpha.bealore.com](https://alpha.bealore.com)
2. Import the library in your component:
```javascript
import { Auth, AuthProvider } from '@alore/auth-react-native-ui';
```
3. Use the component in your render method:
```javascript
export default function App() {
const config = {
clientId: 'your-api-key',
endpoint: 'https://api.alore.com',
locale: 'pt',
authMethods: {
password: false,
passkey: true,
google: false,
},
};
return (
<AuthProvider config={config}>
{/* ... Your app components or screens */}
<Auth
styles={customAuthStyles} // Custom styles for the Auth component
config={{
toast: true,
}}
/>
</AuthProvider>
);
}
```
4. Customize the component as needed.
We welcome contributions! Please follow these steps to contribute:
1. Fork the repository.
2. Create a new branch (`git checkout -b feature/YourFeature`).
3. Make your changes and commit them (`git commit -m 'Add some feature'`).
4. Push to the branch (`git push origin feature/YourFeature`).
5. Open a pull request.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Contact
If you have any questions or suggestions, feel free to reach out to **[bealore.com](https://bealore.com/en/about-us)**.