I use Serverless Framework for AWS Serverless Application for creating REST Full API's.
Requirement
Any Users (e.g register, facebook, google) any devices (e.g Mobile or Web) use API that authenticates via JWT token. if the token is valid user can access AWS Lambda function via AWS API Gateway.
What I do
Use AWS Cognito User Pools for Register and Facebook users, for social user I use Identity providers for getting JWT token, that access API. It's work perfectly fine.
What I need
For mobile users in social login, Facebook gives access token, using that token can I register or login in AWS Cognito User Pools not AWS Cognito Federated Identities ?, After login AWS Cognito User Pools gives JWT token for access AWS lambda function using AWS API gateway.
Why I need
Because of Serverless framework handle authorizer with JWT. Link
Is it right flow?