Guide | API Docs | Consulting | Community
Barong is part of OpenDAX Trading Platform
Barong React Authentication components for barong
If you want to add package to your project run:
npm install --save react-barong
- BarongLoginForm
- BarongRegisterForm
- BarongLogoutButton
- BarongResetPasswordForm
- BarongForgotPasswordForm
- ConfirmEmailForm
- Demo
- Local development
- License
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. |
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. |
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) => React.ReactElement | No | Renders custom button |
text |
string |
No | Buttons string content. Default value: Log Out |
Log out button options
Name | Type | Required | Description |
---|---|---|---|
onClick |
() => void |
Yes | Click handler |
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 |
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 |
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. |
If you want to see demo of this application:
- Clone repositroy
- Run
npm install
npm build
- Go to ./example directory and start development server:
npm install
npm start
For local development you can change version of react-barong
inside ./example/package.json for
"react-barong": "link:.."
then, in root folder, run
npm install
npm start
and start development server
cd ./example
npm install
npm start
Apache 2.0 © openware