Hi Adam. I looked at the sample and your notes about Amplify. I've been building up a sample stack and trying to keep it simpler - using just the Cognito Amplify APIs that were originally in a separate repo but are now bundled with Amplify itself. The whole authentication config experience with cognito via those APIs is a bit ugly. What do you think about what you would do with auth with JWT on this stack with cognito? Do you use something else for managing sign-in? OAuth on top? Curious.
a
Adam Fanello
06/10/2022, 3:36 PM
The client library for Cognito is good, go ahead and use that. There's little difference from the client side between API Gateway v1's Cognito authentication and API Gateway v2/HTTP API with JWT authentication; the difference is that v2 works with either the ID or access token, while v1 oddly required the ID token.
Adam Fanello
06/10/2022, 3:38 PM
You can also just use Cognito's hosted authentication, if you don't mind that user experience. As you say, setting it up can be hard but I found it easier than the client library when doing federated login.
k
Ken Rimple
06/10/2022, 3:44 PM
right, I've used the hosted mode too... That certainly is a good fallback.