Skip to content

Commit

Permalink
Revert "fix(amplify-category-auth): update attr mapping... (#7979)"
Browse files Browse the repository at this point in the history
This reverts commit 94d2491.
  • Loading branch information
jhockett authored Sep 7, 2021
1 parent 94d2491 commit e6236c0
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -601,13 +601,17 @@ Resources:
- ' AttributeMapping: providerMeta.AttributeMapping,'
- ' };'
- ' if (providerMeta.ProviderName === ''SignInWithApple'') {'
- ' requestParams.ProviderDetails = {'
- ' ''client_id'': providerCreds.client_id,'
- ' ''team_id'': providerCreds.team_id,'
- ' ''key_id'': providerCreds.key_id,'
- ' ''private_key'': providerCreds.private_key ? providerCreds.private_key : null,'
- ' ''authorize_scopes'': providerMeta.authorize_scopes,'
- ' };'
- ' if (providerCreds.client_id && providerCreds.team_id && providerCreds.key_id && providerCreds.private_key) {'
- ' requestParams.ProviderDetails = {'
- ' ''client_id'': providerCreds.client_id,'
- ' ''team_id'': providerCreds.team_id,'
- ' ''key_id'': providerCreds.key_id,'
- ' ''private_key'': providerCreds.private_key,'
- ' ''authorize_scopes'': providerMeta.authorize_scopes,'
- ' };'
- ' } else {'
- ' requestParams = null;'
- ' }'
- ' } else {'
- ' requestParams.ProviderDetails = {'
- ' ''client_id'': providerCreds.client_id,'
Expand All @@ -619,11 +623,17 @@ Resources:
- ' };'
- ' let createIdentityProvider = (providerName) => {'
- ' let requestParams = getRequestParams(providerName);'
- ' if (!requestParams) {'
- ' return Promise.resolve();'
- ' }'
- ' requestParams.ProviderType = requestParams.ProviderName;'
- ' return identity.createIdentityProvider(requestParams).promise();'
- ' };'
- ' let updateIdentityProvider = (providerName) => {'
- ' let requestParams = getRequestParams(providerName);'
- ' if (!requestParams) {'
- ' return Promise.resolve();'
- ' }'
- ' return identity.updateIdentityProvider(requestParams).promise();'
- ' };'
- ' let deleteIdentityProvider = (providerName) => {'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,7 @@ const attributeProviderMap = {
attr: 'name',
scope: 'profile',
},
signinwithapple: {
attr: 'name',
scope: 'name',
},
signinwithapple: {},
},
nickname: {
facebook: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ function userPoolProviders(oAuthProviders, coreAnswers, prevAnswers) {
res.hostedUIProviderMeta = JSON.stringify(
oAuthProviders.map(el => {
const lowerCaseEl = el.toLowerCase();
const delimmiter = el === 'Facebook' ? ',' : ' ';
const delimmiter = el === 'Facebook' || el === 'SignInWithApple' ? ',' : ' ';
const scopes = [];
const maps = {};
attributesForMapping.forEach(a => {
Expand Down

0 comments on commit e6236c0

Please sign in to comment.