From e231efac34a3fc4286e18a1e7c22b86e3c7e0772 Mon Sep 17 00:00:00 2001 From: Artur Dudnik Date: Sun, 2 Feb 2020 19:00:13 +0300 Subject: [PATCH] update README #67 --- README.md | 8 ++++++-- src/client/reducer/types.js | 11 +++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 48298bb..782d2c1 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,14 @@ Environment variables: ``` export DATABASE_URL=postgres://postgres:password@localhost:5432/geolocation export GOOGLE_MAPS_API_KEY=AIz...vNkg -export SHARED_DASHBOARD=1 -export ADMIN_TOKEN=admin256 +export SHARED_DASHBOARD=1 # with auth +export ADMIN_TOKEN=admin256 # admin login +export PASSWORD=test # admin password ``` +# auth + + ### Production mode: ```bash diff --git a/src/client/reducer/types.js b/src/client/reducer/types.js index 790dcca..05bc9f9 100644 --- a/src/client/reducer/types.js +++ b/src/client/reducer/types.js @@ -4,3 +4,14 @@ import { type GlobalState } from 'reducer/state'; export type GetState = () => GlobalState; export type Dispatch = (action: Action | ThunkAction) => Promise; // eslint-disable-line no-use-before-define export type ThunkAction = (dispatch: Dispatch, getState: GetState) => Promise; + + +export type AuthSettings = { + org: string, + accessToken: string, +}; + +export type AuthInfo = {| + ...AuthSettings, + error: string, +|};