aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Wilkins <samwilkins333@gmail.com>2019-10-28 04:17:06 -0400
committerSam Wilkins <samwilkins333@gmail.com>2019-10-28 04:17:06 -0400
commitb259472385b03099380f22c7c19ae135b2adf30c (patch)
tree7fc7c3ca165e794ab4d58a888d91370631773cff /src
parentacea9d7aa984fe8b1eeac0546833d3dca3c844e3 (diff)
rename
Diffstat (limited to 'src')
-rw-r--r--src/server/apis/google/GoogleApiServerUtils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/apis/google/GoogleApiServerUtils.ts b/src/server/apis/google/GoogleApiServerUtils.ts
index 92bb8d072..4e5175a2b 100644
--- a/src/server/apis/google/GoogleApiServerUtils.ts
+++ b/src/server/apis/google/GoogleApiServerUtils.ts
@@ -157,12 +157,12 @@ export namespace GoogleApiServerUtils {
export const processNewUser = async (userId: string, authenticationCode: string): Promise<GoogleAuthenticationResult> => {
return new Promise<GoogleAuthenticationResult>((resolve, reject) => {
- worker.getToken(authenticationCode, async (err, token) => {
- if (err || !token) {
+ worker.getToken(authenticationCode, async (err, credentials) => {
+ if (err || !credentials) {
reject(err);
return console.error('Error retrieving access token', err);
}
- const enriched = injectUserInfo(token);
+ const enriched = injectUserInfo(credentials);
await Database.Auxiliary.GoogleAuthenticationToken.Write(userId, enriched);
const { given_name, picture } = enriched.userInfo;
resolve({