nfp_sites/api/authentication/google.mjs
2019-09-14 19:03:38 +00:00

12 lines
361 B
JavaScript

import googleauth from 'google-auth-library'
import config from '../config.mjs'
const oauth2Client = new googleauth.OAuth2Client(config.get('googleid'))
// This is hard to have always running as it requires a
// test access token which always expire.
/* istanbul ignore next */
export function getProfile(token) {
return oauth2Client.getTokenInfo(token)
}