New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-jwt-auth

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-jwt-auth

JSON Web Token authentication and authorization component for React

latest
Source
npmnpm
Version
0.6.0
Version published
Weekly downloads
22
57.14%
Maintainers
1
Weekly downloads
 
Created
Source

React JWT Auth

Token based authentication for react.

Build Status Coverage Status Code Climate Codacy Badge npm
dependencies Status devDependencies Status peerDependencies Status

Work in progress. Contributions are welcomed!

Inspiration

Satellizer, for its simplicity, clear code and maturity was initial source of inspiration. As there is no need to reinvent the wheel, some of Satellizer code has been reused where possible and adopted to React.

Setup

Before you start using component you should configure it, eg:

ReactDOM.render(
	<Auth baseUrl="http://localhost:8080/api/">
		<YourAwesomeComponents />
	</Auth>,
	document.getElementById('app')
);

More in docs, configuration section.

Social buttons

Here is simplest example of social buttons in use inside of your component reder() method.

render () {
	return (
		<div className="form-group">
			<Facebook clientId="310178806023492" />
			<Google clientId="389760969675-u3h2dgm1v3lqd22u8aloimkgd10i0rvf.apps.googleusercontent.com"	/>
		</div>
	)
}

Testing

You can run all tests with:

npm test

Test coverage

We run test coverage with nyc and [here][nyc-why] is why. [nyc-why]: http://stackoverflow.com/a/33725069/6096446)

You can run test coverage task locally with:

npm run test:coverage

It will:

  • run all tests
  • generate coverage data
  • create coverage report files in ./coverage folder
  • check minimum coverage requirements set to 95%

Additionally we use coveralls.io for coverage badge generation. Coverage Status

Keywords

react

FAQs

Package last updated on 28 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts