https://github.com/therealedsheenan/contempo-auth
Authentication method for react
https://github.com/therealedsheenan/contempo-auth
jwt-authentication jwt-token react react-auth webpack
Last synced: 29 days ago
JSON representation
Authentication method for react
- Host: GitHub
- URL: https://github.com/therealedsheenan/contempo-auth
- Owner: therealedsheenan
- License: mit
- Created: 2017-03-25T12:56:52.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T21:34:02.000Z (over 3 years ago)
- Last Synced: 2025-01-22T17:27:19.620Z (over 1 year ago)
- Topics: jwt-authentication, jwt-token, react, react-auth, webpack
- Language: JavaScript
- Size: 1.66 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# contempo-auth [](http://opensource.org/licenses/MIT)
This repo is about how to create an authentication using JWT on
Single Page Applications specifically for React.
## Requirements
The prerequisites are the following:
1.) Mongo Database
2.) [contempo-node-api](https://github.com/therealedsheenan/contempo-node-api)
Make sure you have mongo database in your system.
Setup the API by following the instruction from the link provided.
### Under the hood
With the recent react-router v4, rendering of restricted routes are slightly changed.
Wrapping the router into an HOC and add the authentication function.

You can checkout the [react-router v4](https://reacttraining.com/react-router/) documentation for more information.
### Dependencies
- Contempo repo
- Server API
### How To
- run the development environment with `npm run dev`
- run isomorphic app with `npm run server`
- run tests with `npm run test` or `npm run test:update`
- run eslints with `npm run eslint`
### Additional info
This implements realtime data updates on component.
Checkout the socket configuration files on the Server API and `HomeContainer.js`