In this Lab we will:
You completed this lab if you:
Why is this important?
Nearly every API needs some sort of authentication for users or other services. With AWS Cognito this tasks becomes easy. You can integrate with ApiGateway with nearly no effort and can take advantage of AWS’ Amplify Client library to authenticate your web or mobile clients.
At the end of this lab the url shortener will consist of the following components.
Setting up a Cognito User Pool can be a bit tricky. In order to make it work, you need to:
create-url
for now)AllowHeaders
you defined earlierIn order to connect the frontend with Cognito and allow sign-in / sign-up, we need to:
aws-exports.js
Authorization
header with request that need to authorize (example)formType
to signIn
or signUp
in order to show the correct widget