I'm using Cognito and have a successful flow to my backend service (a lambda function).
I would like to only create a user on signup, not login. However, Cognito calls back to the same URL for login.
Currently, I'm taking the code in the query param and exchanging it for id_token, access_token, and refresh_token. In the id_token, there's an email, which I use to query DynamboDB.
I would like to save a call the call to DynamoDB so I'm wondering if there was a way to differentiate signup versus login in either the headers or the tokens?