ChilliSource.Front.Modules

Authentication

Most of the BlueChilli projects use the same backend framework and as a result, have the exact same APIs for user management. Therefore, use this module ONLY IF you are using the Account module.

Getting Started

This module contains two wrappers, NOT an actual component. They are requireAuthentication & doNotRequireAuthentication;

Import it as such:
import {requireAuthentication, doNotRequireAuthentication} from '../modules/Auth'

Usage

Ideally, you’d be using react-route-dom(React React 4 for the browser) as your navigation system and therefore, using these wrappers is a piece of cake.

You can wrap any component in these wrappers in a route like so:
<Route path="..." component={requireAuthentication(<YOUR_COMPONENT_HERE>)} />

Even if you are not using the routing system, you can still wrap any component in these wrappers and it’ll work.

Description