View authControllerWithErrorHandling.js
import GoogleAuth from 'google-auth-library';
import { googleAuthClientId } from '../../src/constants/config';
import { User } from '../utilities/database';
import { path } from 'ramda';
const checkUserToken = token => {
return new Promise((resolve, reject) => {
const auth = new GoogleAuth();
const client = new auth.OAuth2(googleAuthClientId, '', '');
client.verifyIdToken(token, googleAuthClientId, (error, login) => {
View authController.js
import GoogleAuth from 'google-auth-library';
import { googleAuthClientId } from '../../src/constants/config';
import { User } from '../utilities/database';
import { path } from 'ramda';
const checkUserToken = token => {
return new Promise((resolve, reject) => {
const auth = new GoogleAuth();
const client = new auth.OAuth2(googleAuthClientId, '', '');
client.verifyIdToken(token, googleAuthClientId, (error, login) => {