Amazon Cognito Identity SDK for JavaScript support Authorization Code Grant flow?

Viewed 191

Is there anyway to configure and utilize the Amazon Cognito Identity SDK for JavaScript (https://www.npmjs.com/package/amazon-cognito-identity-js) to use the Authorization Code Grant flow? It seems like it only supports Implicit Grant, indicating that you should not generate a Client Secret when creating an AppClient and the users credentials are exchanged directly for JWTs with an API call.

Utilizing the Amazon Cognito Hosted UI options, the redirect after successful authentication with user credentials includes the authorization code and it can be posted to a backend server/API that performs the interaction with the Token endpoint to exchange the authorization code for JWTs.

Is instead of getting the user's JWTs directly from Cognito using this library/SDK, is it possible for it just mimic the Hosted UI flow and return a authorization code?

0 Answers
Related