2019-02-20 16:10:37 +00:00
|
|
|
import googleauth from 'google-auth-library'
|
2019-09-14 19:03:38 +00:00
|
|
|
import config from '../config.mjs'
|
2019-02-20 16:10:37 +00:00
|
|
|
|
|
|
|
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)
|
|
|
|
}
|