From d7512ace72448242b392299cf459c9c72c8dbee5 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Fri, 11 Aug 2017 14:48:42 +0300 Subject: Get Google authentication flow working --- src/reducers/auth.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/reducers/auth.js (limited to 'src/reducers/auth.js') diff --git a/src/reducers/auth.js b/src/reducers/auth.js new file mode 100644 index 00000000..0d01b300 --- /dev/null +++ b/src/reducers/auth.js @@ -0,0 +1,12 @@ +import {COMPLETE_LOGIN, LOG_OUT} from "../actions/auth"; + +export const auth = (state = {}, action) => { + switch (action.type) { + case COMPLETE_LOGIN: + return action.payload; + case LOG_OUT: + return {}; + default: + return state; + } +}; -- cgit v1.2.3