Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openware/react-barong
Barong React SignUp and SignIn component library
https://github.com/openware/react-barong
barong microservices react reactjs
Last synced: 3 months ago
JSON representation
Barong React SignUp and SignIn component library
- Host: GitHub
- URL: https://github.com/openware/react-barong
- Owner: openware
- Created: 2020-01-30T14:07:35.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:29:30.000Z (almost 2 years ago)
- Last Synced: 2024-09-30T13:22:24.386Z (3 months ago)
- Topics: barong, microservices, react, reactjs
- Language: TypeScript
- Homepage: https://www.openware.com
- Size: 3.13 MB
- Stars: 2
- Watchers: 6
- Forks: 10
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![Cryptocurrency Exchange Platform - OpenDAX](https://github.com/openware/meta/raw/main/images/github_opendax.png)
Guide |
API Docs |
Consulting |
CommunityBarong is part of OpenDAX Trading Platform
---
# react-barong
[![NPM](https://img.shields.io/npm/v/react-barong.svg)](https://www.npmjs.com/package/react-barong) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
> Barong React Authentication components for [barong](https://github.com/openware/barong)
## Installation
If you want to add package to your project run:
```bash
npm install --save react-barong
```## Glossary
- [BarongLoginForm](#BarongLoginForm)
- [BarongRegisterForm](#BarongRegisterForm)
- [BarongLogoutButton](#BarongLogoutButton)
- [BarongResetPasswordForm](#BarongResetPasswordForm)
- [BarongForgotPasswordForm](#BarongForgotPasswordForm)
- [ConfirmEmailForm](#ConfirmEmailForm)
- [Demo](#Demo)
- [Local development](#Local-development)
- [License](#License)### BarongLoginForm
Login form
| Name | Type | Required | Description | Default |
| --------------------------- | --------- | -------- | --------------------------------------------------------------------------- | ------------------------------------------------------------ |
| `redirection` | `string` | Yes | Redirection URL after successful submit. | |
| `host` | `string` | Yes | Barong host string. Example: `https://foo-exchange.com/api/v2`. | |
| `testMode` | `boolean` | No | If test mode is `true`, the submit is fired without calling the barong API. | |
| `forgotPasswordUrl` | `string` | No | If set, the forgot password lint will be appeared. | |
| `confirmationEmailSentText` | `string` | No | Text which appear after confirmation email is sent. | `Your email is not verified. We sent you confirmation link.` |### BarongRegisterForm
Register form
| Name | Type | Required | Description |
| ------------- | --------- | -------- | --------------------------------------------------------------------------- |
| `redirection` | `string` | Yes | Redirection URL after successful submit. |
| `host` | `string` | Yes | Barong host string. Example: `https://foo-exchange.com/api/v2`. |
| `testMode` | `boolean` | No | If test mode is `true`, the submit is fired without calling the barong API. |### BarongLogoutButton
Log out button
| Name | Type | Required | Description |
| ------------- | ---------------------------------------------------- | -------- | --------------------------------------------------------------------------- |
| `redirection` | `string` | Yes | Redirection URL after successful submit. |
| `host` | `string` | Yes | Barong host string. Example: `https://foo-exchange.com/api/v2`. |
| `testMode` | `boolean` | No | If test mode is `true`, the submit is fired without calling the barong API. |
| `render` | (options: [LogoutButtonProps](#LogoutButtonProps)) => React.ReactElement | No | Renders custom button |
| `text` | `string` | No | Buttons string content. Default value: `Log Out` |#### LogoutButtonProps
Log out button options
| Name | Type | Required | Description |
| --------- | ------------ | -------- | ------------- |
| `onClick` | `() => void` | Yes | Click handler |### BarongResetPasswordForm
Reset password form
| Name | Type | Required | Description | Default |
| -------------------- | --------- | -------- | --------------------------------------------------------------------------- | ---------------------- |
| `redirection` | `string` | Yes | Redirection URL after successful submit. | |
| `host` | `string` | Yes | Barong host string. Example: `https://foo-exchange.com/api/v2`. | |
| `testMode` | `boolean` | No | If test mode is `true`, the submit is fired without calling the barong API. | |
| `tokenParameterName` | `string` | No | Name of the query parameter for token. | `reset_password_token` |### BarongForgotPasswordForm
Reset password form
| Name | Type | Required | Description | Default |
| ---------- | --------- | -------- | --------------------------------------------------------------------------- | ------- |
| `host` | `string` | Yes | Barong host string. Example: `https://foo-exchange.com/api/v2`. | |
| `testMode` | `boolean` | No | If test mode is `true`, the submit is fired without calling the barong API. | |
| `delay` | `number` | No | Seconds passed the user can resend an email. | `60` |### ConfirmEmailForm
Reset password form
| Name | Type | Required | Description | Default |
| -------------------- | ----------------- | -------- | --------------------------------------------------------------------------- | -------------------------- |
| `host` | `string` | Yes | Barong host string. Example: `https://foo-exchange.com/api/v2`. | |
| `testMode` | `boolean` | No | If test mode is `true`, the submit is fired without calling the barong API. | |
| `tokenParameterName` | `string` | No | Name of the query parameter for token. | `token` |
| `pendingContent` | `React.ReactNode` | No | Pending content. | `Pending confirmation...` |
| `successContent` | `React.ReactNode` | No | Success content. | `Your email is confirmed.` |
| `errorContent` | `React.ReactNode` | No | Error content. | `Confirmation error.` |## Demo
If you want to see demo of this application:
1. Clone repositroy
2. Run```bash
npm install
npm build
```3. Go to _./example_ directory and start development server:
```bash
npm install
npm start
```## Local development
For local development you can change version of `react-barong` inside ./example/package.json for
```json
"react-barong": "link:.."
```then, in root folder, run
```bash
npm install
npm start
```and start development server
```bash
cd ./example
npm install
npm start
```## License
Apache 2.0 © [openware](https://github.com/openware)