Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Aug 25, 2021
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