Skip to content

Commit

Permalink
fix: Remove userFields debug logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTolmay committed Jun 23, 2022
1 parent 614d7c9 commit 8fad19f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions packages/api/src/routes/auth/callbacks/addUserFieldsToToken.js
Expand Up @@ -16,17 +16,18 @@
import { get } from '@lowdefy/helpers';

function addUserFieldsToToken(context, { account, authConfig, profile, token }) {
const { debug } = context.logger;
// const { debug } = context.logger;
const objects = { account, profile };
debug('Adding userFields to user. Available provider data is:');
debug(objects);
// TODO: Add when debug is fixed.
// debug('Adding userFields to user. Available provider data is:');
// debug(objects);
Object.entries(authConfig.userFields).forEach(([lowdefyFieldName, providerFieldName]) => {
const value = get(objects, providerFieldName);
debug(
`Adding provider field "${providerFieldName}" with value ${JSON.stringify(
value
)} as "${lowdefyFieldName}"`
);
// debug(
// `Adding provider field "${providerFieldName}" with value ${JSON.stringify(
// value
// )} as "${lowdefyFieldName}"`
// );
token[lowdefyFieldName] = value;
});
}
Expand Down

0 comments on commit 8fad19f

Please sign in to comment.