Skip to content

Commit

Permalink
fix(amplify-category-auth): fixed walkthrough prompt after choosing s…
Browse files Browse the repository at this point in the history
…ame web & native app clients (aws-amplify#7954)

* fix(amplify-category-auth): fixed walkthrough prompt after choosing same web & native app clients

* fix(amplify-category-auth): fixed walkthrough prompt after choosing same web & native app clients
  • Loading branch information
lazpavel authored and marcvberg committed Oct 13, 2021
1 parent f8cc8e0 commit a4aaa2d
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ const selectAppClients = async (
answers: ImportAnswers,
): Promise<void> => {
let autoSelected = 0;
let changeAppClientSelction = false;
let changeAppClientSelection = false;
do {
// Select web application clients
if (questionParameters.webClients!.length === 1) {
Expand Down Expand Up @@ -480,12 +480,13 @@ const selectAppClients = async (
answers.appClientNative = questionParameters.nativeClients!.find(c => c.ClientId! === appClientNativeId);
answers.appClientNativeId = undefined; // Only to be used by enquirer

if (answers.appClientNative === answers.appClientWeb) {
changeAppClientSelction = await context.prompt.confirm(importMessages.ConfirmUseDifferentAppClient);
}
changeAppClientSelection =
answers.appClientNative === answers.appClientWeb
? await context.prompt.confirm(importMessages.ConfirmUseDifferentAppClient)
: false;
}
questionParameters.bothAppClientsWereAutoSelected = autoSelected === 2;
} while (changeAppClientSelction);
} while (changeAppClientSelection);
};

const appClientsOAuthPropertiesMatching = async (
Expand Down

0 comments on commit a4aaa2d

Please sign in to comment.