Skip to content

therealedsheenan/contempo-auth

Repository files navigation

logo contempo

contempo-auth License

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

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.

sampe code

You can checkout the react-router v4 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

Releases

No releases published

Packages

No packages published

Languages