Firestore-roles Redux module
Redux module for auth using firebase auth and firestore-roles system.
Companion to firestore-roles system. Redux module for firestore-roles system
Usage
1. Install
$ npm$ npm install --save firestore-roles-redux-module # Install dependencies $ npm install --save redux-thunk
Requirements: redux-thunk
middleware.
2. Define state types: State.ts
You have to put RolesAuth module under the rolesAuth
key.
;
4. Define Actions type: Actions.ts
; ;
3. Configure store in /store/index.ts
;;;; ;;;;
4. Initialize rolesAuth in your initialization logic
// dispatch initialize() thunk action inside your initialization logicstore.dispatchactions.auth.initialize;
5. Use firebase-auth with redirect flow