I understand AWS Cognito User Pools are the right tool for user signins using OpenID services.
But what options are good for authorizing the app itself? Say you just wanted to authorize a charge from a front end React.js app, and the user isn’t logged in but filled out a checkout. What is the right flow for that use case?
I have this much worked out:
Order request > API Gateway (request handling)
> Cognito (service type unclear)
> Lambda (handle login success/fail)
> Stripe (payment processor) (handle order success/fail)
> Lambda (transmit orderinfo to DB > RDS (DB update)
> Lambda (DB event response handling)
> API Gateway (response to client)
Seems like a pretty complex flow, is that accurate? And what Cognito flow should be used?