In this step we will create a simple PetStoreConsoleApp. This console app will support all the features of AuthProcess running against AWS Cognito, initialize the PetStore library and make a simple call against the stack.
<ItemGroup> <EmbeddedResource Include="..\Stacks\Dev\AwsSettings.json" /> <EmbeddedResource Include="..\LocalApis.json" /> </ItemGroup>
Here is a sample command window session:
You can use any login, password and email you want in this tutorial step. The email must be valid so you can receive the authentication code sent to that email in the sign up step. You can sign up only once with the same email address.
Welcome to the PetStoreConsoleApp program Use LocalApi? y/n:n 1. Sign Up 2. Sign In 3. Reset Password 4. Quit >1 Enter your Login: MyLoginName Enter your Password: MyPassword! Enter your Email address: email@example.com Enter authentication code: 984185 You are Signed Up! You can now SignIn. 1. Sign Up 2. Sign In 3. Reset Password 4. Quit >2 Enter your Login: MyLoginName Enter your current Password: MyPassword! 1. Sign Out 2. Update Password 3. Update Phone 4. Update Login 5. Seed Pets data 6. Get Pet 1 7. Quit >5 Pets added to database 1. Sign Out 2. Update Password 3. Update Phone 4. Update Login 5. Seed Pets data 6. Get Pet 1 7. Quit >6 pet: 1 Alf Available 1. Sign Out 2. Update Password 3. Update Phone 4. Update Login 5. Seed Pets data 6. Get Pet 1 7. Quit >7
Your authentication process still runs against the AWS stack but your calls to the PetStore library will call the Local WebApi (PetStore) project. You can set debug breakpoints in both the PetStoreConsoleApp and PetStore projects!
In this step we created a Console App project and used it to run against both the AWS Application Stack and the local WebApi. When running locally, we simultaneously debugged the client and WebApi projects.