diff --git a/client/src/auth/index.js b/client/src/auth/index.js index 61b90eb6e..47daf01db 100644 --- a/client/src/auth/index.js +++ b/client/src/auth/index.js @@ -182,21 +182,21 @@ class Auth { async signinOrCreateAccount ({ accessToken, idToken, expiresAt }) { try { - const data = await client.mutate({ + const response = await client.mutate({ mutation: AUTHENTICATE, variables: { idToken } }) Log.info('auth.signinOrCreateAccount data:') - Log.info(await data) + Log.info(response) const user = { - authId: await data.teams_Authenticate.authId, - alias: await data.teams_Authenticate.alias + authId: response.data.teams_Authenticate.authId, + alias: response.data.teams_Authenticate.alias } setItem('user', JSON.stringify(user)) if (window.location.href.includes(`callback`)) { - window.location.href = '/dashboard' + window.location.href = '/' } - return data + return response.data } catch (err) { return console.log('Sign in or create account error: ', err) }