Fixing duplicate handle login call

This commit is contained in:
Matias committed 2019-07-17 09:18:52 -03:00
1 parent eb53329b17
commit 1189f29b7d
2 files changed
+1 -7

No files matched your search

-1
View File
@@ -39,7 +39,6 @@ export const MasterApp = props => (
<Route
path='/callback'
render={props => {
auth.handleAuthentication(props)
return <Callback {...props} />
}}
/>
+1 -6
View File
@@ -1,16 +1,11 @@
import Auth0Lock from 'auth0-lock'
import gql from 'graphql-tag'
import { getItem, setItem } from '../utils/local-storage'
import { validObject, deleteCookie, slugify, isEmpty } from '../utils/js-helpers'
import Log from '../utils/log'
import { client } from '../graphql/apollo'
import { AUTH_CONFIG } from './Auth0' // create by renaming Auth0.sample.js to Auth0.js and setting vars
import { setInitialEcosystem } from '../utils/ecosystem'
const AUTHENTICATE = gql`
mutation authenticate($idToken: String!) {
users_Authenticate(idToken: $idToken) {
@@ -187,7 +182,7 @@ class Auth {
window.location.href = '/'
return true
} catch (err) {
console.log('Sign in or create account error: ', err)
console.log('Sign in or create account error.')
window.localStorage.removeItem('access_token')
window.localStorage.removeItem('id_token')
window.localStorage.removeItem('expires_at')