import * as type from "./actionTypes";

export const authRequest = () => ({
  type: type.AUTH_REQUEST,
  payload: {},
});

export const authSuccessful = (event) => {
  const profile = event.profileObj ? event.profileObj : undefined;
  const token = event.tokenObj && event.tokenObj.id_token ?
    event.tokenObj.id_token : undefined; // otken object.id
  return {
    type: type.AUTH_SUCCESSFUL,
    payload: { token, profile },
  };
};

export const authFailed = (error, details) => ({
  type: type.AUTH_FAILED,
  payload: { error, details },
});

@@ -147,21 +147,24 @@
 sful = (
-event
+response
 ) =%3E %7B%0A 
@@ -184,176 +184,76 @@
 e = 
-event.profileObj ? event.profileObj : undefined;%0A  const token = event.tokenObj && event.tokenObj.id_token ?%0A    event.tokenObj.id_token : undefined; // otken object.id
+response.profileObj;%0A  const token = response.tokenObj.access_token;
 %0A  r

use access_token