Package Exports
- react-twitter-auth
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-twitter-auth) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React Twitter Authentication Component
A React Twitter oAUth Sign-in / Log-in Component for React
Installation
npm install react-twitter-auth
Usage
<TwitterLogin loginUrl="http://localhost:4000/api/v1/auth/twitter"
onFailure={this.onFailed} onSuccess={this.onSuccess}
requestTokenUrl="http://localhost:4000/api/v1/auth/twitter/reverse"/>
Options
params | value | default value | description |
---|---|---|---|
tag | string | button | tag that should be used to create element that will be used as loging element |
text | string | Sign in with Twitter | text that will be shown in component |
loginUrl | string | URL that will be used to finish 3rd step of authentication process | |
requestTokenUrl | string | URL that will be used to get request token | |
onFailure | function | function that will be called if user cannot be authenticated | |
onSuccess | function | function that will be called if user is successfully authenticated | |
disabled | boolean | false | disable component |
style | object | style object | |
className | string | class name for component | |
dialogWidth | number | 600 | dialog width |
dialogHeight | number | 400 | dialog height |
Examples
Full example can be found in example folder.
License
react-twitter-auth is released under MIT License.